This documentation is archived and is not being maintained.
Version::ToString Method (Int32)
Visual Studio 2010
Namespace:
System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- fieldCount
- Type: System::Int32
The number of components to return. The fieldCount ranges from 0 to 4.
Return Value
Type: System::StringThe String representation of the values of the major, minor, build, and revision components of the current Version object, each separated by a period character ('.'). The fieldCount parameter determines how many components are returned.
fieldCount | Return Value |
|---|---|
0 | An empty string (""). |
1 | major |
2 | major.minor |
3 | major.minor.build |
4 | major.minor.build.revision |
| Exception | Condition |
|---|---|
| ArgumentException | fieldCount is less than 0, or more than 4. -or- fieldCount is more than the number of components defined in the current Version object. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: