27 lines
631 B
C#
27 lines
631 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Collections.ObjectModel;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace ObervableCollectionSample
|
|||
|
{
|
|||
|
public class PersonCollection : ObservableCollection<Person>
|
|||
|
{
|
|||
|
public PersonCollection()
|
|||
|
{
|
|||
|
InitInstance();
|
|||
|
}
|
|||
|
|
|||
|
private void InitInstance()
|
|||
|
{
|
|||
|
this.Add(new Person("neymar"));
|
|||
|
this.Add(new Person("messi"));
|
|||
|
this.Add(new Person("ronaldo"));
|
|||
|
this.Add(new Person("park"));
|
|||
|
this.Add(new Person("sonny"));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|