C# Version ToString()
Description
Version ToString()
converts the value of the current
Version object to its equivalent String representation.
Syntax
Version.ToString()
has the following syntax.
public override string ToString()
Returns
Version.ToString()
method returns The String representation of the values of the
major, minor, build, and revision
components of the current Version object.
Example
//from w w w .j a v a 2 s. co m
using System;
public class Example
{
public static void Main()
{
string input = "4.0";
Version ver = Version.Parse(input);
Console.WriteLine(ver.ToString());
}
}
The code above generates the following result.