獲得的值。如果我有這樣的ConcurrentDictionary:從ConcurrentDictionary
public class User
{
public string Context { get; set; }
public bool Owner { get; set; }
}
protected static ConcurrentDictionary<User, string> OnlineUsers = new ConcurrentDictionary<User, string>();
有誰知道我怎麼會得到Owner
的價值,如果我已經有Context
的價值?基本上我想用Context
做一個「查找」。謝謝。
莫不是以相同的語境不止一個用戶對象,如果是的話,你希望讓所有的人? – hatchet
編號上下文對每個用戶都是唯一的。 :) –