¡@

Home 

c# Programming Glossary: arebothnotnull

Is creating a C# generic method that accepts (nullable) value type and reference type possible?

http://stackoverflow.com/questions/4003026/is-creating-a-c-sharp-generic-method-that-accepts-nullable-value-type-and-refe

is reference. So this is what I start with public bool areBothNotNull T T p1 T p2 return p1.HasValue p2.HasValue So I want to be able.. So I want to be able to use it like this var r1 areBothNotNull int 3 4 will be true var r2 areBothNotNull int 3 null will be.. this var r1 areBothNotNull int 3 4 will be true var r2 areBothNotNull int 3 null will be false var r3 areBothNotNull string three..