DateTime in winForms
- by cameron
I have the following code within the class.
basically what i need is it to tell me the current DateTime.
where i have a problem is when compiling, as under the dateTime code there is syntax error
saying: "The type 'dateAndTime' already contains a definition for 'dateTime'"
class dateAndTime
{
public dateAndTime dateTime { get; private set; }
DateTime dateTime = new DateTime();
DateTime dateTime;
}
}
can anyone help with this problem please?
much appreciated!