siri Posted October 1, 2008 Share Posted October 1, 2008 Hi,I want to know whether storing a collection of structure instance would be better (in terms of performance) than storing a collection of class instance in Session.I am using the InProc mode. Link to comment Share on other sites More sharing options...
aspnetguy Posted October 1, 2008 Share Posted October 1, 2008 You most likely should use classes. Structs are intended to only hold small amounts of data.Also if you are going to be passing the Structs through any functions then copies (increasing memory use) will be made because Structs are immutable and pass by value while classes are mutable and pass by reference. Link to comment Share on other sites More sharing options...
siri Posted October 1, 2008 Author Share Posted October 1, 2008 Are value types like structure get serialized when stored in session INPROC mode ? Link to comment Share on other sites More sharing options...
aspnetguy Posted October 1, 2008 Share Posted October 1, 2008 no InProc mode does not serialize sessions. If you need that you will have to use StateServer or SQLServer modes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.