Returns the default string representation of this Version that contains the specified number of components. The format of the string returned is:
<majorVersion>.<minorVersion>[.<revision>[.<build>]]
[Visual Basic] Overloads Public Function ToString( _ ByVal fieldCount As Integer _ ) As String [C#] public string ToString( int fieldCount ); [C++] public: String* ToString( int fieldCount ); [JScript] public function ToString( fieldCount : int ) : String;
Exception Type | Condition |
---|---|
ArgumentException | if fieldCount is more than the number of defined components of this Version |
For example, if Version was created using the constructor Version(1,3,5), the value returned for ToString(2) is 1.3. ArgumentException will be thrown for ToString(4).
Version Class | Version Members | System Namespace | Version.ToString Overload List