I need help for a problem in my application.
In my application , I need to use double.NotANumber when I make Default(T) and the type of my generic is double. But what I get is “0.0”.
Is they a way to get the value I need????
I need help for a problem in my application. In my application , I
Share
No.
default(double)will always be 0, and there’s nothing you can do to change that.The closest you could come would be to write a separate static method:
You’d then need to call that method instead of using
default(T). It’s pretty nasty though 🙁