Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下列表类
public class Users { public string Username { get; set; } public string PlayerID { get; set; } }
我想知道如何选择 username = x 的 playerID ?
var player = playerList.FirstOrDefault(p => p.Username == "x"); if(player != null) { string id = player.PlayerID; }