According to ReferenceSource, the Version
class is sealed
, ICloneable
, IComparable
, IComparable<Version>
, IEquatable<Version>
. It also only stores int
values. Is there a particular reason why the .NET programmers chose to make this a class instead of a struct? Why would someone need a null
version?
Here's the field declaration block from ReferenceSource:
// AssemblyName depends on the order staying the same
private int _Major;
private int _Minor;
private int _Build = -1;
private int _Revision = -1;
They even make a comment, saying they need to keep the fields aligned. Maybe it's just me, but this is really a struct thing?