I need to serialize static class with BinaryFormatter, here is the code:
void Serialize()
{
IFormatter formatter = new BinaryFormatter();
using (FileStream s = File.Create("ServerInfo.bin"))
formatter.Serialize(s, Server); // ERROR: Error 44 'Server' is a 'type' but is used like a 'variable'
}
How can i fix this?