When a class is compiled in c# do the functions get stored with it, thus increasing the memory required?
In other words is it worth creating two classes 1 to store the data and one to store all the functions with an instance of the data class?
So if I have 200 instances of the data only class would it differ (memory required) from 200 instances of the data+function class?
The functions are not stored with the instance of the class. The overhead of the functions is associated with the Type and not the individual instances. So the instance footprint is not affected by the number of functions.
Here is a link I found doing a quick ‘Bing’ that will provide more detail if you are interested.
http://www.codeproject.com/KB/cs/net_type_internals.aspx