So I've been trying to figure out the most efficient way to pull off this trick:
I have a two column primary key in the database (an int and a string) and I'm trying to make a cache (I like using dictionaries) and I need to have a way to reference the two values as a key to get the object out.
The key is
private struct PageNameOnSite
{
public int siteId;
public string pageName;
}
It was suggested to me that I make a class to wrap this instead but that doesn't sound like the best way to use memory once this thing gets 10,000 entries put in it. My understanding that the memory footprint of a struct is smaller than that of a class.