7

I was reviewing the implementation of some primitive types, specifically System.Double in .NET's Reference Source and I stumbled upon this:

[System.Runtime.Versioning.NonVersionable]
public static bool operator ==(Double left, Double right) {
    return left == right;
}

[System.Runtime.Versioning.NonVersionable]
public static bool operator !=(Double left, Double right) {
    return left != right;
}

I know that this kind of self referencing operator implementations can be a decompiler issue as explained here, but I was under the impression that the code shown in the Reference Source was actual source code and not the output of a decompiler.

Can anyone explain whats really going on here?

InBetween
  • 32,319
  • 3
  • 50
  • 90

0 Answers0