FileInfo[] Images; 
 Images = Folder.GetFiles("Image Files (JPEG,GIF,BMP)|*.jpg;*.jpeg;*.gif;*.bmp|JPEG Files(*.jpg;*.jpeg)|*.jpg;*.jpeg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp|All Files|*.*", SearchOption.AllDirectories);

getting error here

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: Illegal characters in path.

completely confused because it works nice in other app. what i m missing?
help

Error says that the first argument of GetFiles method has invalid characters or pattern. Use wild card chars - * or ? e.g. *.txt

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.