EDIT: Sorry if this seems a bit obvious / simple, I tried to find the answer, but I'm not sure how to put it right.
I am learning a bit of C #, and I am having trouble drawing new objects around the created objects, where the constructor and class type are different. Thus, a regular object will be created:
Object obj = new Object();
This is pretty obvious, but since I was studying interfaces, I came across some syntax, for example:
interface ISaveable {
string Save();
}
public class Catalog : ISaveable {
string Save() {
return "Catalog Save";
}
string ISaveable.Save(){
return "ISaveable Save";
}
}
And then the textbook continued to do something like that:
Catalog c1 = new Catalog();
So, I know that an instance of a new instance of the catalog class is being created, but I can’t understand in life that the following line:
ISaveable c2 = new Catalog();
( ..), c2. (ISaveable) ( ())?
!