Compartilhar via


Version.ToString Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Converts the value of the current Version object to its equivalent String representation.

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

Syntax

'Declaration
Public Overrides Function ToString As String
public override string ToString()

Return Value

Type: System.String
The String representation of the values of the major, minor, build, and revision components of the current Version object, as depicted in the following format. Each component is separated by a period character ('.'). Square brackets ('[' and ']') indicate a component that will not appear in the return value if the component is not defined:
major.minor[.build[.revision]]
For example, if you create a Version object using the constructor Version(1,1), the returned string is "1.1". If you create a Version object using the constructor Version(1,3,4,2), the returned string is "1.3.4.2".

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.