Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
Setting an instance to null
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Marc
9y
568
1
Reply
I have a decrypter that returns a decrypted value and decrypted catagory. If for some reason my program cannot find the catagory is it best to set the instance of the catagory to null or dispose it? This way I can still provide the decrypted value, but not the decrypted catagory. Below is what I have done thus far.....
GetKey key = GetKey.Instace[category.ToLower()];
bool ctgry = key.DoesCategoryExist(category.ToLower());
if (ctgry == false)
{
//key.dispose();
key
= null;
// which should work best
?
}
I am also trying to log the fact that no category exists within the if statement or upon the diposel of key without throwing an exemption.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How can I use sessions in windows application?
put the System.Windows.Form.ComboBox in Datagridview C# wind