What I beleive you are attempting to do is create a singleton object. This is it in it's most simple form.
public class SomeClass
{
//single instance used everywhere.
private static SomeClass _instance;
//private constructor so only the GetInstance() method can create an instance of this object.
private SomeClass()
{
}
//get single instance
public static SomeClass GetInstance()
{
if (_instance != null) return _instance;
return _instance = new SomeClass();
}
}
Now to access the same instance of your object, you can just call
SomeClass singleton = SomeClass.GetInstance();
If you want to use more advanced techniques then you could consider using something like dependency injection, this however is a different discussion.
EDIT:
public class SomeClass
{
private static SomeClass _instance;
private SomeClass()
{
}
public static SomeClass GetInstance()
{
if (_instance == null)
throw new Exception("Call SetInstance() with a valid object");
return _instance;
}
public static void SetInstance(SomeClass obj)
{
if (obj == null)
throw new ArgumentNullException(nameof(obj));
_instance = obj;
}
}