I'm really not fully familiar with casting. So feel free to edit or comment changes to my question.
Let's say I have a class that implements an interface:
public class Class1: Interface1
{
}
Whats the difference between these two?:
Interface1 myObject = new Class1();
and
Class1 myClassObject = new Class1();
Interface1 myObject = (Interface1) myClassObject;
Is the first one also a form of casting?
Edit:
What does each one do?