DateTime in winForms

Posted by cameron on Stack Overflow See other posts from Stack Overflow or by cameron
Published on 2010-12-25T23:46:25Z Indexed on 2010/12/25 23:54 UTC
Read the original article Hit count: 589

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms