DefaultParameterValue in C#
I would like to pass in a DateTime as a DefaultParameterValue to my method using DefaultParameterValueAttribute class in the .net framework. Is there a way to do that ?

I can pass in a string, boolean and other types liek the code below. I tried passing in Nullable DateTime but did not work.

     object SomeMethod([Optional, DefaultParameterValue("")]string param1,
                      [Optional, DefaultParameterValuefalse)] bool isValid,
                      [Optional, DefaultParameterValue(null)] Nullable<DateTime> valuationDate
          );


DefaultParameterValue in C#
===

I would like to pass in a DateTime as a DefaultParameterValue to my method using DefaultParameterValueAttribute class in the .net framework. Is there a way to do that ?

I can pass in a string, boolean and other types liek the code below. I tried passing in Nullable DateTime but did not work.

     object SomeMethod([Optional, DefaultParameterValue("")]string param1,
                      [Optional, DefaultParameterValuefalse)] bool isValid,
                      [Optional, DefaultParameterValue(null)] Nullable<DateTime> valuationDate
          );

