I want to load the data from XML file and show in the listbox?

前端 未结 1 2006
别跟我提以往
别跟我提以往 2021-01-27 20:20

I have a three classes:

First is Person:

    public class Person
{
    public string FirstName { get; set; }
    public string LastName { get; set; }
            


        
相关标签:
1条回答
  • 2021-01-27 20:50

    At some point you've got to instantiate personList.

    In your code, you can't handle the Changed event on personList because it is still null.

    So instead of

    Persons personList = null;
    

    Maybe try

    Persons personList = new Persons();
    
    0 讨论(0)
提交回复
热议问题