Solved

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

Posted on 2009-03-31
3
725 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 250 total points
ID: 24032808
But what is _Poly, is that a class in your project or part of someone else's library?
0
 
LVL 29

Assisted Solution

by:anarki_jimbel
anarki_jimbel earned 250 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now