OK..
public uint m_sumenum;
public static uint Somenum
{
set { m_somenum = value; }
get { return m_somenum; }
}
Not really - firstly it would only be static if the variable was static - eg it was going to be on a per class basis, not a perinstance, that and you dont *HAVE* to use get and set properties to access it, you could just make it public so you would either have a
public class SomeClass
{
public static int ACounter;
public int OtherCounter;
}
In this instance you could make 5 copies of "SomeClass" and 1 counter is shared between them all (ACounter) and 1 counter is per instance (OtherCounter)
so, you dont *need* to but its good practice on the simple grounds that it saves changing it later, and protects your variables if you wish from change.. and you can add validation etc..
In short your initial code with a static property for a instance based private variable fails, because the private variable isnt instanced so the static class cant use it.