how are classes stored in .net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I create several instances of a class, is it just the properties that exist as multiple copies. What happens to the methods i.e. common functionality? If they are stored in a session object, what is actually stored
 
Jason,
When I create several instances of a class, is it just the properties that exist as multiple copies. What happens to the methods i.e. common functionality?

Yes, only the instance data is unique for each object. Method code is
shared by all objects in the appdomain (or possibly the entire
process).



Mattias
 

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