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.
我有包含 2 个字符串的结构:名称,Uid。我将此结构添加到列表框中,并且我希望列表框仅显示结构名称。我怎么能这样做?
谢谢!
public struct ListItemEl { public string Name; public string Uid; }
如果您希望(应该设置为)工作,这些需要是公共属性。DisplayMemberPathName
DisplayMemberPath
Name