Advertisement
Guest User

Untitled

a guest
Nov 14th, 2012
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. string foo = null;
  2. string bar = "woooo";
  3. string foobar= foo ?? bar ;
  4.  
  5. =
  6.  
  7. IL_0001:  ldnull      
  8. IL_0002:  stloc.0    
  9. IL_0003:  ldstr       "woooo"
  10. IL_0008:  stloc.1    
  11. IL_0009:  ldloc.0    
  12. IL_000A:  dup        
  13. IL_000B:  brtrue.s    IL_000F
  14. IL_000D:  pop        
  15. IL_000E:  ldloc.1    
  16. IL_000F:  stloc.2    
  17.  
  18. string foo = null;
  19. string bar = "woooo";
  20. if(foo==null)
  21. {
  22.    string foobar =   "woooo" ;
  23. }
  24.  
  25. =
  26.  
  27. IL_0001:  ldnull      
  28. IL_0002:  stloc.0    
  29. IL_0003:  ldstr       "woooo"
  30. IL_0008:  stloc.1    
  31. IL_0009:  ldloc.0    
  32. IL_000A:  ldnull      
  33. IL_000B:  ceq        
  34. IL_000D:  ldc.i4.0    
  35. IL_000E:  ceq        
  36. IL_0010:  stloc.3    
  37. IL_0011:  ldloc.3    
  38. IL_0012:  brtrue.s    IL_001C
  39. IL_0014:  nop        
  40. IL_0015:  ldstr       "woooo"
  41. IL_001A:  stloc.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement