Solved

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

Posted on 2009-03-31
3
734 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 30

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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