Skip to Main Content
C# in a Nutshell, Second Edition
book

C# in a Nutshell, Second Edition

by Peter Drayton, Ben Albahari, Ted Neward
August 2003
Intermediate to advanced content levelIntermediate to advanced
928 pages
32h 1m
English
O'Reilly Media, Inc.
Content preview from C# in a Nutshell, Second Edition

Name

Version

Synopsis

This class represents a version number. The .NET framework uses it as the version of assemblies, operating systems, and network protocols. A version number consists of as many as four parts: a major, minor, build, and revision number. For some applications, such as the HTTP protocol, only the first two numbers (major and minor) are used.

public sealed class Version : ICloneable, IComparable {
// Public Constructors
   public Version( );
   public Version(int major, int minor);
   public Version(int major, int minor, int build);
   public Version(int major, int minor, int build, int revision);
   public Version(string version);
// Public Instance Properties
   public int Build{get; }
   public int Major{get; }
   public int Minor{get; }
   public int Revision{get; }
// Public Static Methods
   public static bool operator !=(Version v1, Version v2);
   public static bool operator <(Version v1, Version v2);
   public static bool operator <=(Version v1, Version v2);
   public static bool operator =  =(Version v1, Version v2);
   public static bool operator >(Version v1, Version v2);
   public static bool operator >=(Version v1, Version v2);
// Public Instance Methods
   public object Clone( ); 
// implements ICloneable
   public int CompareTo(object version);
// implements IComparable
   public override bool Equals(object obj);          
// overrides object
   public override int GetHashCode( );    
// overrides object
   public override string ToString( );    
// overrides object
   public string ToString(int fieldCount);
}

Returned By

Environment.Version ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# in a Nutshell

C# in a Nutshell

Ben Albahari, Ted Neward, Peter Drayton
C# 7.0 in a Nutshell

C# 7.0 in a Nutshell

Joseph Albahari, Ben Albahari
C# Cookbook, 2nd Edition

C# Cookbook, 2nd Edition

Jay Hilyard, Stephen Teilhet
C# Cookbook

C# Cookbook

Joe Mayo

Publisher Resources

ISBN: 0596005261Catalog PageErrata