.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sharon Maxwell

Post New Resource Bookmark and Share   

Argument out of range exception

Posted By:Karthikeyan Anbarasan       Posted Date: January 13, 2011    Points: 15    Category:    URL: http://www.dotnetspark.com  

This code shows how to throw the argument out of range exception

            if (value >= 0 && value <= 10)
               intVal = value;
               throw (new ArgumentOutOfRangeException("Val", value,
                  "Assign Value between 0 and 10."));


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend