Sdílet prostřednictvím


IFileToContentTypeService.GetContentTypeForExtension(String) Method

Definition

Gets the content type associated with the given file extension.

public:
 Microsoft::VisualStudio::Utilities::IContentType ^ GetContentTypeForExtension(System::String ^ extension);
public Microsoft.VisualStudio.Utilities.IContentType GetContentTypeForExtension (string extension);
abstract member GetContentTypeForExtension : string -> Microsoft.VisualStudio.Utilities.IContentType
Public Function GetContentTypeForExtension (extension As String) As IContentType

Parameters

extension
String

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

Returns

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

Applies to