title: Bloated Session Struct:
body: <p>I understand the basic differences between structs and class types. But, in an ASP.NET WebForms application...what is the ideal container type to hold a relatively large data structure in Session in an ASP.NET WebForms application? Should it be a struct or class? For example...</p>
  
  <pre><code>Public Structure SessionData     
  
   Public ShipVias As List(Of XXXXX999.sycdefil_sql_VW)
   Public ShipTos As List(Of XXXXX999.ABC_Web_ShipTo_VW)
   Public Dests As List(Of XXXXX999.ABC_Web_CofA_VW)
   Public Owners As List(Of XXXXX999.ABC_Web_CofA_VW)
  
   Public Carts As List(Of XXXXX999.ABC_Web_Cart_VW)
   Public Carriers As List(Of XXXXX999.ABC_Carrier_Accounts_VW)
  
   Public Countries As List(Of XXXXX999.usp_get_CountryListResult)
   Public States As List(Of XXXXX999.usp_get_StatesListResult)
  
   Public POItems As List(Of XXXXX999.usp_get_cart_infoResult)
  
   Public SearchResults As List(Of SearchResult)
   Public Addresses As List(Of AddressResult)
  
   Public CartItems As List(Of itemsdetail)
  
   Public POs As List(Of POResult)
  
   Public SomeCollection As Collection
   Public CmpCode As String
   Public CmpStatus As String
   Public CmpSIPCust As String
   Public CurrentSession As String
   Public AllowAccess As Boolean
  
   Public QuickAddItems As List(Of QuickAddItem)
  
  End Structure
  </code></pre>
  
  <p>As you can probably tell, XXXXX999 contains a  LINQTOSQL DataContext dbml containing sprocs, functions, views and tables. </p>
  
  <p>Edit point: I just realized I can make a struct(C#) to be nullable...In vb.net Nullable(Of SessionData)...also question mark does the trick like so...
  Dim sd As SessionData?
  Should I keep this as a Structure or convert it to a Class? </p>