Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the content type associated with the given file extension.
Namespace: Microsoft.VisualStudio.Utilities
Assembly: Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)
Syntax
'Declaration
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
Parameters
- extension
Type: System.String
The file extension. It cannot be nulla null reference (Nothing in Visual Basic), and it should not contain a period.
Return Value
Type: Microsoft.VisualStudio.Utilities.IContentType
The IContentType associated with this extension. If no association exists, it returns the "unknown" content type. It never returns null.
.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.