GetContentTypeForExtension Method

IFileExtensionRegistryService.GetContentTypeForExtension Method (String)

 

Gets the content type associated with the given file extension.

Namespace:   Microsoft.VisualStudio.Utilities
Assembly:  Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)

IContentType GetContentTypeForExtension(
	string extension
)

Parameters

extension
Type: System.String

The file extension. It cannot be null, and it should not contain a period.

Return Value

Type: Microsoft.VisualStudio.Utilities.IContentType

The IContentType associated with this extension. If no association exists, it returns the "unknown" content type. It never returns null.

Return to top
Show:
© 2016 Microsoft