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.
LVL 4
zstapicAsked:
Who is Participating?
 
Todd GerbertConnect With a Mentor IT ConsultantCommented:
But what is _Poly, is that a class in your project or part of someone else's library?
0
 
anarki_jimbelConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.