//----------------------------------------------------------------------------- // overrides public override bool Equals(object o) { OSVersionInfo p = o as OSVersionInfo; if (p != null) { return(this == p); } return(base.Equals(o)); }
private void CopyThis(OSVersionInfo o) { // normal fields _OSPlatformId = o._OSPlatformId; _MajorVersion = o._MajorVersion; _MinorVersion = o._MinorVersion; _BuildNumber = o._BuildNumber; _CSDVersion = o._CSDVersion; // extended fields _OSSuiteFlags = o._OSSuiteFlags; _OSProductType = o._OSProductType; _ServicePackMajor = o._ServicePackMajor; _ServicePackMinor = o._ServicePackMinor; _Reserved = o._Reserved; // state fields // _Locked = o._Locked ; _Locked = false; _ExtendedPropertiesAreSet = o._ExtendedPropertiesAreSet; }
public virtual int CompareTo(object o) { if (o == null) { throw new InvalidOperationException("CompareTo( object o ): 'o' is null"); } OSVersionInfo p = o as OSVersionInfo; if (p == null) { throw new InvalidOperationException("CompareTo( object o ): 'o' is not an OSVersionInfo"); } if (this == p) { return(0); } if (this > p) { return(1); } return(-1); }
public virtual void Copy(OSVersionInfo o) { CopyThis(o); }
//----------------------------------------------------------------------------- // Copying public OSVersionInfo(OSVersionInfo o) { CopyThis(o); }