Check out example codes for "using variables from other procedures C#". It will help you in understanding the concepts better.

Code Example 1

void Method1()
{
    var myString = "help";
    Method2(myString);
}

void Method2(string aString)
{
    var myString = "I need ";
    var anotherString = myString + aString;
}

Learn ReactJs, React Native from akashmittal.com