Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. extern alias TheAliasYouGaveTheReference
  2.  
  3. TheAliasYouGaveTheReference::Acme.Foo f = new
  4. TheAliasYouGaveTheReference::Acme.Foo();
  5.  
  6. using System;
  7.  
  8. namespace Acme
  9. {
  10. public class Foo
  11. {
  12. public void Bar()
  13. {
  14. Console.WriteLine("Bar");
  15. }
  16. }
  17. }
  18.  
  19. using System;
  20.  
  21. namespace Acme
  22. {
  23. public class Foo
  24. {
  25. public void Bar()
  26. {
  27. Console.WriteLine("Bar");
  28. }
  29.  
  30. public void Goo()
  31. {
  32. Console.WriteLine("Goo");
  33. }
  34. }
  35. }
  36.  
  37. Acme.Foo f = new Acme.Foo();
  38.  
  39. extern alias FooVersion1;
  40.  
  41. FooVersion1::Acme.Foo f = new FooVersion1::Acme.Foo();
  42. f.Bar();
  43.  
  44. Acme.Foo f2 = new Acme.Foo();
  45. f2.Goo();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement