Skip to content

Instantly share code, notes, and snippets.

@drewnoakes
Created February 24, 2017 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewnoakes/665565e61d3c651e58e98ee5872a2909 to your computer and use it in GitHub Desktop.
Save drewnoakes/665565e61d3c651e58e98ee5872a2909 to your computer and use it in GitHub Desktop.
ReferenceEqualityComparer.msil
.class public sealed auto ansi beforefieldinit
Test.ReferenceEqualityComparer
extends [mscorlib]System.Object
implements [mscorlib]System.Collections.IEqualityComparer, class [mscorlib]System.Collections.Generic.IEqualityComparer`1<object>
{
.field private static initonly class Test.ReferenceEqualityComparer '<Default>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
= (01 00 00 00 )
.method public hidebysig static specialname class Test.ReferenceEqualityComparer
get_Default() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor()
= (01 00 00 00 )
.maxstack 8
IL_0000: ldsfld class Test.ReferenceEqualityComparer Test.ReferenceEqualityComparer::'<Default>k__BackingField'
IL_0005: ret
}
.method public final hidebysig virtual newslot instance bool
Equals(
object x,
object y
) cil managed
{
.maxstack 8
// [379 55 - 379 76]
IL_0000: ldarg.1 // x
IL_0001: ldarg.2 // y
IL_0002: ceq
IL_0004: ret
}
.method public final hidebysig virtual newslot instance int32
GetHashCode(
object obj
) cil managed
{
.maxstack 8
// [380 47 - 380 78]
IL_0000: ldarg.1 // obj
IL_0001: call int32 [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::GetHashCode(object)
IL_0006: ret
}
.method public hidebysig specialname rtspecialname instance void
.ctor() cil managed
{
.maxstack 8
IL_0000: ldarg.0 // this
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
.method private hidebysig static specialname rtspecialname void
.cctor() cil managed
{
.maxstack 8
IL_0000: newobj instance void Test.ReferenceEqualityComparer::.ctor()
IL_0005: stsfld class Test.ReferenceEqualityComparer Test.ReferenceEqualityComparer::'<Default>k__BackingField'
IL_000a: ret
}
.property class Test.ReferenceEqualityComparer Default()
{
.get class Test.ReferenceEqualityComparer Test.ReferenceEqualityComparer::get_Default()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment