i found a piece of code that use ObservableCollection but they can use list or any other collection related classes. can anyone tell me what is the benifit of using ObservableCollection.
ObservableCollection<Employee> empData = new ObservableCollection<Employee>
{
new Employee{Name="Diptimaya Patra", Contact="0000",
EmailID="[email protected]", Country="India"},
new Employee{Name="Dhananjay Kumar", Contact="00020",
EmailID="[email protected]", Country="India"},
new Employee{Name="David Paul", Contact="1230",
EmailID="[email protected]", Country="India"},
new Employee{Name="Christina Joy", Contact="1980",
EmailID="[email protected]", Country="UK"},
new Employee{Name="Hiro Nakamura", Contact="0000",
EmailID="[email protected]", Country="Japan"},
new Employee{Name="Angela Patrelli", Contact="0000",
EmailID="[email protected]", Country="Japan"},
new Employee{Name="Zoran White", Contact="0000",
EmailID="[email protected]", Country="Scotland"},
};
please discuss in detail. thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…