Pull the 'rnd' declaration out of the method:
Random rnd = new Random();
private static int generateRandom()
{
return rnd.Next(1, 8);
}
Convert between VB, C#, C++, & Java (http://ift.tt/MqfcUL)
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter
No comments:
Post a Comment