Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

I was trying to run the following code:

Hashtable hashTable = context.Values;

For your information context.Values returns ICollection.

Anyway, this gave me an error that there is problem problem converting ICollection to a Hashtable but the interesting thing in the error message was that it also said that the explicit conversion exists. I think thats pretty cool that Visual Studio.NET 2005 is helping you to actually cast the object to another type.

Hashtable hashTable = (Hashtable) context.Values;

Hope it helps!

 

powered by IMHO 1.3

Posted on Friday, January 6, 2006 11:09 AM | Back to top


Comments on this post: Visual Studio.NET 2005 helps while casting!

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net