When you cast something, you don;t "throw away" anything from the object, it doesn't actually change the object in any way at all. All it does is change what you can do with it in terms of your code.
Think about cars for a moment.
You have a Car class:
public class Car
{
public int CountWheels { get { return 4; } }
}
And you use that to create a derived class for each manufacturer:
public class Ford : Car
{
public bool MadeInGermany { get { return false;} }
}
public class MercedesBenz : Car
{
public bool MadeInAmerica { get { return false;} }
}
You can manipulate a Ford:
Car thatCar = new Ford();
Ford thisCar = (Ford) thatCar;
Console.WriteLine("{0}:{1}", thisCar.CountWheels, thisCar.MadeInGermany);
And casting it doesn't do anything to it - it remains both a Car and a Ford.
What you can't do is cast a Mercedes to a Ford:
Car thatCar = new MercedesBenz();
Ford thisCar = (Ford) thatCar;
Console.WriteLine("{0}:{1}", thisCar.CountWheels, thisCar.MadeInGermany);
And the system will thrown an exception, because a Ford and a Mercedes are not the same - you can't take a Mercedes badge, glue it to a ford and expect people to believe it! :laugh:
If you have an instance of the base class in derivedInstance before you do this:
derivedInstance = new Derived();
Then the system will discard the reference to that instance when you load the new value - but it won't change that instance. In your code
Base derivedInstance = new Derived();
derivedInstance is a new variable, so it contained no previous instance anyway, the line defining the variable sets it's first value.