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)deGlobalComputers.NativeObject;
IADsContainer iconUsers = (IADsContainer)deGlobalComputers.NativeObject;
IADsContainer iconGroups = (IADsContainer)deGlobalComputers.NativeObject;
iconComputers.Filter = new object[] {"meeting"};
int numOfComputers = iconComputers.Count;
--
Thanks.
IContainer is an interface, not a class.
The code you provided is abstract, as you're dealing only with method signatures, not real code.
IADsContainer iconComputers = (IADsContainer)deGlobalComputers.NativeObject;
Here looks like you're assigning the (IADsContainer)deGlobalComputers.NativeObject to an Interface.
The exception you're having is automatically writen by the VS 2005 when we implement an interface thru Refactoring.
I don't know what that IADsContainer object is... by the name looks like an Interface (starts with an I), but if you have more code you can post it.
int numOfComputers = 0;
foreach (object o in iconComputers)
numOfComputers++;
0
lapuccaAuthor Commented:
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.
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
IContainer is an interface, not a class.
The code you provided is abstract, as you're dealing only with method signatures, not real code.
IADsContainer iconComputers = (IADsContainer)deGlobalCom
Here looks like you're assigning the (IADsContainer)deGlobalCom
The exception you're having is automatically writen by the VS 2005 when we implement an interface thru Refactoring.
I don't know what that IADsContainer object is... by the name looks like an Interface (starts with an I), but if you have more code you can post it.
Alex