Skip to content

Instantly share code, notes, and snippets.

@hexagit
Last active July 24, 2019 09:36
Show Gist options
  • Save hexagit/9ea7cee5e658629906912cd7347dbdf0 to your computer and use it in GitHub Desktop.
Save hexagit/9ea7cee5e658629906912cd7347dbdf0 to your computer and use it in GitHub Desktop.
Enum.GetHashCodeのIL
// num += TestEnum.Test0.GetHashCode();
IL_0012: ldloc.0
IL_0013: ldc.i4.1
IL_0014: stloc.3
// (no C# code)
IL_0015: ldloca.s 3
IL_0017: constrained. ConsoleApp1.Program/TestEnum
IL_001d: callvirt instance int32 [System.Runtime]System.Object::GetHashCode()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment