¡@

Home 

c# Programming Glossary: myargument

Null or default comparison of generic argument in C#

http://stackoverflow.com/questions/65351/null-or-default-comparison-of-generic-argument-in-c-sharp

generic method defined like this public void MyMethod T T myArgument The first thing I want to do is check if the value of myArgument.. The first thing I want to do is check if the value of myArgument is the default value for that type something like this if myArgument.. is the default value for that type something like this if myArgument default T But this doesn't compile because I haven't guaranteed..

How do I compare a generic type to its default value? [duplicate]

http://stackoverflow.com/questions/864243/how-do-i-compare-a-generic-type-to-its-default-value

generic method defined like this public void MyMethod T T myArgument The first thing I want to do is check if the value of myArgument.. The first thing I want to do is check if the value of myArgument is the default value for that type something like this if myArgument.. is the default value for that type something like this if myArgument default T But this doesn't compile because I haven't guaranteed..