The closest thing that somehow relates to your question that I can think of are
ref
-Parameters in method calls:
void SomeMethod()
{
int x = 1;
SomeOtherMethod(ref x);
}
void SomeOtherMethod(ref int a)
{
a = 2;
}
As you can see,
ref
-Parameters allow the called method to modify the value of a variable within the calling method's scope. But other methods that aren't called from SomeMethod() have no way to modify the value of
x
.
Heavy use of
ref
-Parameters is generally bad practice, you should think twice before using it.