What wrong this class? I try to reach extension method but cant
namespace BO
{
public static class Helper
{
public static DateTime? ConvertNullDate(this DateTime date)
{
return date != DateTime.MinValue ? date : (DateTime?)null;
}
}
}
If not possible, whats the solution should be
if your input is DateTime? then you don't need to convert it DateTime?!
so i think you want something like below
public static DateTime? ConvertNullDate(this DateTime date)
{
return date != DateTime.MinValue ? date : (DateTime?)null;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With