Casting

Casting classes up and down.

B b = new B();
A a = (A)b;
B c = a as B;

if (c != null)
{
//cast succeeded
}
>/pre>
Lastest update in June 2011, inital post in June 2011

Write a comment

I appreciate comments, suggestions, compliments etc. Unfortunately I have no time to reply to them. Useful input will be used for sure!