Hi
I wonder why i can define and use a variable of type DateTime without having to instantiate class DateTime (DateTime dat = new DateTime while with random, i have to use Random rnd = new Random(); otherwise, i get the error "unassigned local variable":
Thanks.
DateTime dat; dat = DateTime.Parse("12/02/12"); Console.WriteLine(dat.ToLongDateString()); // this works without DateTime dat = new DateTime: why?
Random rnd; Console.Write(rnd.Next(2)); error "unassigned local variable":