Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-03-31
3
Medium Priority
?
739 Views
Last Modified: 2012-05-06
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
Comment
Question by:zstapic
3 Comments
 
LVL 33

Accepted Solution

by:
Todd Gerbert earned 750 total points
ID: 24032808
But what is _Poly, is that a class in your project or part of someone else's library?
0
 
LVL 30

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 750 total points
ID: 24033046
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
 
LVL 4

Author Closing Comment

by:zstapic
ID: 31565027
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question