Advertisement
Suchiman

Untitled

Sep 22nd, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. Dictionary<object, string> dic = new Dictionary<object, string>();
  2. object obj1 = new object();
  3. object obj2 = new object();
  4. dic[obj1] = "Hello obj1";
  5. dic[obj2] = "What obj2";
  6. var str1 = dic[obj1]; //Hello obj1
  7. var str2 = dic[obj2]; //What obj2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement