private static void Main(string[] args){
int a = 0;
generateNumber(out a);
Console.WriteLine(a); // prints random value from 'generateNumber' function
}
public static void generateNumber(out int n)
{
Random random = new Random();
n = random.Next(0, 100);
}