Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1.  
  2. public static what
  3. {
  4. public static default<T>(Nullable<T> this a){
  5. if (a.HasValue){
  6. return a.Value;
  7. }
  8. else return default(T);
  9. }
  10. }
  11. }
  12. }
  13.  
  14. int? k = null;
  15. k.default(); //grazins nuli
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement