set default value for DateTime in optional parameter

Posted by Sadegh on Stack Overflow See other posts from Stack Overflow or by Sadegh
Published on 2010-06-13T04:47:31Z Indexed on 2010/06/13 4:52 UTC
Read the original article Hit count: 390

Filed under:
|
|

how i can set default value for DateTime in optional parameter?

public SomeClassInit(Guid docId, DateTime addedOn = DateTime.Now???)
{
    //Init codes here
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about datetime