Let's say I wish to store an instance of the following in Application State, to be accessed very often.
public class Example {
public string A;
public string B;
public bool C;
public int D;
// ...
}
I can't decide whether to store the whole class together as Application["Example"]
, or to store its properties individually as Application["ExampleA"]
etc.
My thinking is that ((Example)Application["Example"]).A
might have to copy the whole class into memory just to access one property - is that right? Or am I mistaken?