HttpRuntime.TargetFramework Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the version of the .NET Framework that the current web application targets.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public static Version TargetFramework { get; }

Property Value

Type: System.Version

The version of the .NET Framework that the current web application targets.

This property is normally set by using the targetFramework attribute of the httpRuntime element in the Web.config file.

This property is not guaranteed to return a correct value if the currentapplication domain is not an ASP.NET application domain.

.NET Framework
Available since 4.5
Return to top
Show: