The returned collection also contains the FileType.Unknown value, which has an empty extension. An example of obtaining a list of supported file types is presented below. The example uses LINQ methods, so it requires the System.Linq namespace.
C#
IEnumerable<FileType>supportedFileTypes=FileType.GetSupportedFileTypes().Where(ft=>ft!=FileType.Unknown)// Skipping the unknown file type.OrderBy(ft=>ft.Extension);foreach(FileTypefileTypeinsupportedFileTypes){Console.WriteLine(fileType.Extension.PadRight(8)+" - "+fileType.Description);}
More resources
Advanced usage topics
To learn more about search features and get familiar how to enhance your search solution, please refer to the advanced usage section.
GitHub examples
You may easily run the code from documentation articles and see the features in action in our GitHub examples: