Z
z_learning_tester
//Let's say the Document class implements the IStorable interface...
class Document : IStorable
{...}
//Then we create a document object...
Document doc = new Document();
//Then we have the following line of code(the part I don't understand)...
IStorable isDoc = doc as Istorable;
Is this last line the same as saying:
IStorable isDoc = (IStorable) doc;
In other words, is the "as" word, just another way of casting?
Thanks,
Jeff
class Document : IStorable
{...}
//Then we create a document object...
Document doc = new Document();
//Then we have the following line of code(the part I don't understand)...
IStorable isDoc = doc as Istorable;
Is this last line the same as saying:
IStorable isDoc = (IStorable) doc;
In other words, is the "as" word, just another way of casting?
Thanks,
Jeff