Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

out c#

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);
}
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+7 =