Share via


IFileAssociationCollection.Add(String, String, String, String) Method

Definition

Creates a file association and adds it to the collection.

public:
 void Add(System::String ^ extension, System::String ^ defaultIcon, System::String ^ description, System::String ^ progid);
public:
 void Add(Platform::String ^ extension, Platform::String ^ defaultIcon, Platform::String ^ description, Platform::String ^ progid);
void Add(std::wstring const & extension, std::wstring const & defaultIcon, std::wstring const & description, std::wstring const & progid);
[System.Runtime.InteropServices.DispId(3)]
public void Add (string extension, string defaultIcon, string description, string progid);
[<System.Runtime.InteropServices.DispId(3)>]
abstract member Add : string * string * string * string -> unit
Public Sub Add (extension As String, defaultIcon As String, description As String, progid As String)

Parameters

extension
String

The file name extension for the file type.

defaultIcon
String

The default icon that is associated with files of this type.

description
String

The description of the program used to open files of this type.

progid
String

The ProgID that identifies the program used to open files of this type.

Attributes

Exceptions

extension is null or an invalid file name extension.

Applies to