當(dāng)您將如下所示的公共類引用為列表框的值成員和顯示成員時(shí),public class example{ public String anexample { get; set; } public String example2 {get; set; }}為什么它只適用于引號(hào)?listBox1.ValueMember = "example";listBox1.DisplayMember = "example";我可能聽(tīng)起來(lái)太具體了,但是當(dāng)涉及到混淆我的代碼時(shí),這對(duì)我來(lái)說(shuō)是一個(gè)問(wèn)題。
為什么使用公共類需要為列表框的值成員和顯示成員加引號(hào)?
ibeautiful
2021-07-20 17:00:05