You might want to debug your application and try to step through your sample code line by line. Also, i'm curious that why you don't just use the TreeNode instance from the Nodes collection instead of using the GetNodeFromIndex method. Anyway, below is a quick example for this:
private ArrayList GetContacts()
ArrayList Contacts = new ArrayList();
foreach(TreeNode node in TV\_MasterContactList.Nodes)
{
GetSelectedContactID(node, Contacts);
}
return Contacts;
}
private void GetSelectedContactID(TreeNode node, ArrayList Contacts)
{
if(node.Checked)
Contacts.Add(node.ID);
foreach(TreeNode child in node.Nodes)
{
GetSelectedContactID(child, Contacts);
}
}