TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Marc
NA
205
54.1k
Catagory Cannot be found
Oct 15 2014 10:18 AM
I'm having an issue that if a user enters a none existing catagory or typing error, and that catagory is not listed it causes the application to crash. I've narrowed it down to this particular piece of code but want to know what type of condition I can use that if the instance "key" cannot be found to throw an exemption.
This is what I have so far...
myDecryptor.DomainKey key = myDecryptor.DomainKey.Instance[dmCategory.ToLower()]
//what I've added
if (key)
//looking for a condition that would throw this exception if key is not found
{
throw new Exception();
}
Reply
Answers (
4
)
Should I go back to my OOP line
Devloping s/w, want the lables, input in marathi language