File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,19 @@ static void Main(string[] args)
4545 ResultPropertyCollection myResultPropColl ;
4646 myResultPropColl = mySearchResult . Properties ;
4747
48- // return only specified fields
48+ // return only specified attributes
4949 if ( searchProperties . Count > 0 )
5050 {
5151 foreach ( string attr in searchProperties )
5252 {
53- Console . WriteLine ( mySearchResult . Properties [ attr ] [ 0 ] . ToString ( ) ) ;
53+ // some attributes - such as memberof - have multiple values
54+ for ( int i = 0 ; i < mySearchResult . Properties [ attr ] . Count ; i ++ )
55+ {
56+ Console . WriteLine ( mySearchResult . Properties [ attr ] [ i ] . ToString ( ) ) ;
57+ }
5458 }
5559 }
56- // if no fields specified, return all
60+ // if no attributes specified, return all
5761 else
5862 {
5963 foreach ( string myKey in myResultPropColl . PropertyNames )
You can’t perform that action at this time.
0 commit comments