-
Container Filter Help
Help needed with this code for .NET please:-
The following code utilises ADSI and will work under VBScript
Code:
Dim Container As IADsContainer
Container.Filter=Array("Computer")
This will create a new Array with all of the Computer objects in the collection.
How can I get the same result in VB .NET without having to use a For...Each statement (i.e) -
Code:
For Each LeafObject in Container
If LeafObject.Class="Computer" Then
' some code
End If
Next
The assignment to the Array in the first code segment fails under .NET with an 'Array is a type and cannot be used as an expression'. All help gratefully recieved.
-
This problem has re-surfaced again (I used a workaround last time that's not applicable in my new app)...
Does anybody know how to solve this???
-
Scrub that last...
....does anybody have any good tutorials or documents that will show me how to use the System.DirectoryServices namespace...
TIA.