Referencing difference between Struct and Class...

  • Thread starter Thread starter Dan Bass
  • Start date Start date
D

Dan Bass

Is this right or not as a difference between C# struct's and classes?

// if successful myStruct will contain a copy of the structure which is
myObj
object myStruct = (StructEg) myObj;

and

// if successful myClass will contain different reference to the same
ClassEg instance
object myClass = (ClassEg) myObj;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top