[This is preliminary documentation and is subject to change.]

Gets the content type from a file extension.

Namespace: Simple.WebSimple.WebSimple::Web
Assembly: Simple.Web (in Simple.Web.dll)

Syntax

C#

public string GetMediaTypeFromFileExtension(

string file,

IList<string> acceptedTypes

)

VB

Public Function GetMediaTypeFromFileExtension( _

file As String, _

acceptedTypes As IList(Of String) _

) As String

C++

public:

virtual String^ GetMediaTypeFromFileExtension(

String^ file,

IList<String^>^ acceptedTypes

sealed

Parameters

Return Value

Type: System.StringSystem.StringSystem::String
The acceptable type for the file.

Implements

IWebEnvironment.GetMediaTypeFromFileExtension(string, IList<string>)IWebEnvironment.GetMediaTypeFromFileExtension(String, IList(Of String))IWebEnvironment::GetMediaTypeFromFileExtension(String^, IList<String^>^)

See Also

WebEnvironmentWebEnvironmentWebEnvironment Class
Simple.WebSimple.WebSimple::Web Namespace