Hi,
How would I achieve something like this in C#?
object Registry;
Registry = MyProj.Registry.Instance;
int Value;
Value = 15;
Registry.Value = Value; /* Sets it to 15 */
Value = 25;
Value = Registry.Value; /* Returns the 15 */
So far I have this object:
namespace MyProj
{
internal sealed class Registry
{
static readonly Registry instance = new Registry();
static Registry()
{
}
Registry()
{
}
public static Registry Instance
{
get
{
return instance;
}
}
}
}