Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

access a local varible in a different function C#

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);
    // at this point x==2
}

void SomeOtherMethod(ref int a)
{
    a = 2;
}
 
PREVIOUS NEXT
Tagged: #access #local #varible #function
ADD COMMENT
Topic
Name
8+4 =