IFileAssociationCollection::Add Method (String^, String^, String^, String^)
Visual Studio 2015
Creates a file association and adds it to the collection.
Assembly: Microsoft.VisualStudio.ManagedInterfaces.9.0 (in Microsoft.VisualStudio.ManagedInterfaces.9.0.dll)
[DispIdAttribute(3)]
void Add(
String^ extension,
String^ defaultIcon,
String^ description,
String^ progid
)
Parameters
- extension
-
Type:
System::String^
The file name extension for the file type.
- defaultIcon
-
Type:
System::String^
The default icon that is associated with files of this type.
- description
-
Type:
System::String^
The description of the program used to open files of this type.
- progid
-
Type:
System::String^
The ProgID that identifies the program used to open files of this type.
| Exception | Condition |
|---|---|
| ArgumentException | extension is null or an invalid file name extension. |
If an association for the file name extension already exists, the new association replaces it in the collection.
Show: