View Single Post
  #2 (permalink)  
Old September 11th, 2006, 04:45 PM is offline
Authorized User
Join Date: Jul 2004
Location: , , .
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post

a static class is the answer you are looking for. In a C# process, a static member of a class can be access from anywhere within the process. In your example:

public MyStats
  public static MyStats Instance = new MyStats();
  private MyStats()

That is a singleton design pattern. This means that this class can only have one instance and that instance can only be accessed from the MyStats.Instance member.

Hope this helps!
Get A Computer Job!
Computer Parts & Accessories