///
/// Example singleton object in c#.
///
public class SingletonExample
{
///
/// Static class constructor is called first time the class is
/// accessed. We are creating our Singleton here.
///
static SingletonExample()
{
singleton = new SingletonExample();
}
///
/// Reference to the singleton instance
///
public static SingletonExample singleton;
///
/// Instance value
///
public string myValue = "test";
}