Partager via


IFileExtensionRegistryService.GetContentTypeForExtension, méthode

Obtient le type de contenu associé à l'extension de fichier donnée.

Espace de noms :  Microsoft.VisualStudio.Utilities
Assembly :  Microsoft.VisualStudio.CoreUtility (dans Microsoft.VisualStudio.CoreUtility.dll)

Syntaxe

'Déclaration
Function GetContentTypeForExtension ( _
    extension As String _
) As IContentType
IContentType GetContentTypeForExtension(
    string extension
)
IContentType^ GetContentTypeForExtension(
    String^ extension
)
abstract GetContentTypeForExtension : 
        extension:string -> IContentType
function GetContentTypeForExtension(
    extension : String
) : IContentType

Paramètres

  • extension
    Type : String

    Extension de fichier. Il ne peut pas être nullune référence null (Nothing en Visual Basic), et ne doit pas contenir une période.

Valeur de retour

Type : Microsoft.VisualStudio.Utilities.IContentType
IContentType associé à cette extension.Si aucune association n'existe, il retourne le type de contenu « inconnu ».Il ne retourne jamais null.

Sécurité .NET Framework

Voir aussi

Référence

IFileExtensionRegistryService Interface

Microsoft.VisualStudio.Utilities, espace de noms