Using system;
Using system. collections;
Namespace livechain. CSW. commondata
{
Public class childdata
{
// Only property
}
Public class childdatacollection: system. Collections. collectionbase, system. componentmodel. ilistsource
{
// String fullname = "livechain. CSW. commondata. childdata ";
Public childdata this [int Index]
{
Get
{
Return (childdata) list [Index]);
}
Set
{
List [Index] = value;
}
}
Public childdata this [String childid]
{
Get
{
Foreach (childdata child in List)
{
If (child. childid = childid)
Return child;
}
// If can't find the child, return NULL;
Return new childdata ();
}
}
Public int add (childdata value)
{
Return (list. Add (value ));
}
Public int indexof (childdata value)
{
Return (list. indexof (value ));
}
Public void insert (INT index, childdata value)
{
List. insert (index, value );
}
Public void remove (childdata value)
{
List. Remove (value );
}
Public bool contains (childdata value)
{
// If value is not of Type childdata, this will return false.
Return (list. Contains (value ));
}
# Region ilistsource Member
Public ilist getlist ()
{
// Todo: Add studentdatacollection. getlist
Return this. List;
}
Public bool containslistcollection
{
Get
{
// Todo: Add studentdatacollection. containslistcollection getter implementation
Return false;
}
}
# Endregion
}