Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 740
  • Last Modified:

Value does not fall within the expected range when initializing string variable

Hi, I'm getting this exception "Value does not fall within the expected range" when running application. I can't seem to find reason for crashing because exception occurs on this line:
_Poly.Name = MapZoneName;

When I debug it MapZoneName holds regular string value.
0
zstapic
Asked:
zstapic
2 Solutions
 
Todd GerbertIT ConsultantCommented:
But what is _Poly, is that a class in your project or part of someone else's library?
0
 
anarki_jimbelCommented:
May be _Poly.Name set property does some check, e.g. verifies that the MapZoneName is a valid name (for example, corresponds some enumeration or something like that)? What's the code for the property?
0
 
zstapicAuthor Commented:
I totally forgot that Name property is not mine but inherited from UserControl Class. I just made my own String property and now is fine.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now