List and print all supported file types

The Supported file formats page lists all file formats supported by GroupDocs.Viewer.

To list or print out all the supported file formats within your application, follow these steps:

  1. Call the GetSupportedFileTypes method of the FileType class.
  2. Enumerate the collection of the FileType objects.

The following code snippet shows how to list supported file formats in the console:

// Get list of file types.
IEnumerable<FileType> supportedFileTypes = FileType.GetSupportedFileTypes();
// Display list of file types
foreach (FileType fileType in supportedFileTypes)
{
    Console.WriteLine(fileType);
}

The following image shows a sample console output: