IFileAssociationCollection.Add Method
Creates a file association and adds it to the collection.
Namespace: Microsoft.VisualStudio.ManagedInterfaces.Publish
Assembly: Microsoft.VisualStudio.ManagedInterfaces.9.0 (in Microsoft.VisualStudio.ManagedInterfaces.9.0.dll)
Syntax
'Declaração
Sub Add ( _
extension As String, _
defaultIcon As String, _
description As String, _
progid As String _
)
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.
Exceptions
Exception | Condition |
---|---|
ArgumentException | extension is nulla null reference (Nothing in Visual Basic) or an invalid file name extension. |
Remarks
If an association for the file name extension already exists, the new association replaces it in the collection.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.