✅ How to return variables from a function
void method() doesnt allow me to use the variables inside it outside the function, how do i do this?
string from a method, for example$scopesscope A {
thing a;
scope B {
thing b;
}
}thing ascope Ascope Bscope Bthing bThe number is 69string Method(int num)
{
return $"The number is {num}";
}
var str = Method(69);
Console.WriteLine(str);