lapucca
asked on
I'm getting NotImplementedException when I tried to get the Count property from the IContianer object.
I'm getting NotImplementedException when I tried to get the Count property from the IContianer object iconComputers. What does this error mean? How can I correct this problem? Thanks.
//deGlobalComputers is a DirectoryEntry object.
IADsContainer iconComputers = (IADsContainer)deGlobalCom puters.Nat iveObject;
IADsContainer iconUsers = (IADsContainer)deGlobalCom puters.Nat iveObject;
IADsContainer iconGroups = (IADsContainer)deGlobalCom puters.Nat iveObject;
iconComputers.Filter = new object[] {"meeting"};
int numOfComputers = iconComputers.Count;
--
Thanks.
//deGlobalComputers is a DirectoryEntry object.
IADsContainer iconComputers = (IADsContainer)deGlobalCom
IADsContainer iconUsers = (IADsContainer)deGlobalCom
IADsContainer iconGroups = (IADsContainer)deGlobalCom
iconComputers.Filter = new object[] {"meeting"};
int numOfComputers = iconComputers.Count;
--
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Paul. I already have coded it that way but I want to know why the IContainer code won't work. As both of you have pointed out that Count property isn't implemented so I'll just split the points between you 2. Thank you both.
int numOfComputers = iconComputers.Count;
foreach (object o in iconComputers)
numOfComputers++;