c# - Error 1 Non-invocable member 'System.IO.SearchOption.AllDirectories' cannot be used like a method -


string[] files = directory.getfilesystementries(directorytosearch, filenametofind, searchoption.alldirectories());

just error says, can't invoke searchoption.alldirectories method, because isn't method. think want this:

string[] files = directory.getfilesystementries(directorytosearch, filenametofind, searchoption.alldirectories); 

putting parentheses after tells compiler should execute method. confusing compiler. searchoption.alldirectories value, not method.


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c - Avoiding Extra Malloc in Linked List (node->next = NULL) -