Share via


IFileExtensionRegistryService.AddFileExtension(String, IContentType) Method

Definition

Adds a new file extension to the registry.

public:
 void AddFileExtension(System::String ^ extension, Microsoft::VisualStudio::Utilities::IContentType ^ contentType);
public:
 void AddFileExtension(Platform::String ^ extension, Microsoft::VisualStudio::Utilities::IContentType ^ contentType);
void AddFileExtension(std::wstring const & extension, Microsoft::VisualStudio::Utilities::IContentType const & contentType);
public void AddFileExtension (string extension, Microsoft.VisualStudio.Utilities.IContentType contentType);
abstract member AddFileExtension : string * Microsoft.VisualStudio.Utilities.IContentType -> unit
Public Sub AddFileExtension (extension As String, contentType As IContentType)

Parameters

extension
String

The file extension (the period is optional).

contentType
IContentType

The content type for the file extension.

Exceptions

is already present in the registry.

Applies to