Skip to content

Instantly share code, notes, and snippets.

@Phuseos
Created June 1, 2016 11:10
Show Gist options
  • Save Phuseos/c2f9e98f37a11da3d5f5b95cdd2e5eaa to your computer and use it in GitHub Desktop.
Save Phuseos/c2f9e98f37a11da3d5f5b95cdd2e5eaa to your computer and use it in GitHub Desktop.
Generate random number (C#)
//Void that generates a random number
//Call by using RandomInt(0, 100) where 0 is the minimum number and 100 the max
public static int GetRandom { get; set; }
void RandomInt(int MinRandom, int MaxRandom)
{
Random r = new Random();
GetRandom = r.Next(MinRandom, MaxRandom);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment