magnusbakken

Untitled

May 22nd, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. // 1.
  2. namespace I1
  3. {
  4.     using I2;
  5.     public class A
  6.     {
  7.         B b; // Works
  8.     }
  9. }
  10.  
  11. namespace I2
  12. {
  13.     public class B { }
  14. }
  15.  
  16. namespace B { }
  17.  
  18.  
  19. // 2.
  20. using I2;
  21. namespace I1
  22. {
  23.     public class A
  24.     {
  25.         B b; // Error: 'B' is a 'namespace' but is used like a 'type'
  26.     }
  27. }
  28.  
  29. namespace I2
  30. {
  31.     public class B { }
  32. }
  33.  
  34. namespace B { }
Advertisement
Add Comment
Please, Sign In to add comment