The previous samples showed the use of Item method and FindEntry method to find specific entry objects in the Directory. Another way of finding entries is the Filter object. The Filter object starts its search from the default context and continues based on the scope set in the filter object. The Fullname property can be set to search for objects from a different context. The sample code snippet searches for all User objects within the specified scope.
Filter object is used to set up the scope and the filter expression.
The filter expression is set to search for all User objects. The above sample also lists the values of all the fields that are set. The filter object can be used to formulate more complex queries and retrieve the required information. The current context can be located by using the Fullname property of the Directory object.