Hello
I have this code that is not working and giving me compile error...im using visual studio .net 2005
im getting error at this line
and here is the error that i am getting
could any one please tell me what is wrong with the code?
thanks
§ Rented Lips §
----------------
Begning To Learn
----------------
I have this code that is not working and giving me compile error...im using visual studio .net 2005
Code:
using System;
namespace RandomNumberGenerator
{
/// <summary>
/// Random Number Generator
/// Author: Sheeraz AHMED
/// DAte: 25-05-2007
/// </summary>
class Random
{
static void Main(string[] args)
{
Random ran = new Random();
Console.WriteLine(ran.Next (1, 7));
Console.Write("\n\nPlease press enter to quit");
Console.ReadLine();
}// end main
}//end random class
}// end random number generator namespace
im getting error at this line
Code:
Console.WriteLine(ran.Next (1, 7));
and here is the error that i am getting
Code:
Error 1 'RandomNumberGenerator.Random' does not contain a definition for 'Next' D:\My .NET Work\C #\Console\RandomNumberGenerator\RandomNumberGenerator\Random.cs 16 35 RandomNumberGenerator
could any one please tell me what is wrong with the code?
thanks
§ Rented Lips §
----------------
Begning To Learn
----------------