Settling Casting Restrictions

Remember the Casting Restrictions we discussed a while back, let us settle that now. So we have some code like this: object obj = i; long l = (long)obj; And an invalid cast exception while casting …

Read more →

The WD Anti-Propaganda Campaign !!!

Thanks to the internet. If nobody else bothers or understands what loss of data means, you can shout it aloud here. I lost 500GB of data - every moment of my personal and professional life captured in …

Read more →

Casting Restrictions ???

We all know that the runtime can detect the actual type of a System.Object instance. The primitive data types provided by the runtime are compatible with one another for casting (assuming that we do …

Read more →

Understanding (ref)erences

Let us take a look at the following piece of code:- public void Operate(IList iList2) { iList2 = new List(); iList2.Add(1); iList2.Add(2); iList2.Add(3); } public static void Main() { IList iList= new …

Read more →