Skip to content

Instantly share code, notes, and snippets.

@DaanV2
Last active January 30, 2021 15:32
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 DaanV2/9f2a8f6829a8334b318f2718be780b80 to your computer and use it in GitHub Desktop.
Save DaanV2/9f2a8f6829a8334b318f2718be780b80 to your computer and use it in GitHub Desktop.
using System;
public class C {
public Int32 First(string Command, Int32 A, Int32 B) {
switch(Command) {
case "Add":
return A + B;
case "Substract":
return A - B;
case "Divide":
return A / B;
case "Multiply":
return A * B;
default:
return -1;
}
}
public Int32 Second(string Command, Int32 A, Int32 B) {
switch(Command) {
case "Add":
return A + B;
case "Substract":
return A - B;
case "Divide":
return A / B;
case "Multiply":
return A * B;
case "A":
case "B":
case "C":
case "D":
default:
return -1;
}
}
}
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
public class C
{
public int First(string Command, int A, int B)
{
if (!(Command == "Add"))
{
if (!(Command == "Substract"))
{
if (!(Command == "Divide"))
{
if (Command == "Multiply")
{
return A * B;
}
return -1;
}
return A / B;
}
return A - B;
}
return A + B;
}
public int Second(string Command, int A, int B)
{
uint num = <PrivateImplementationDetails>.ComputeStringHash(Command);
if (num <= 2805258597u)
{
if (num <= 2103908752)
{
if (num != 916994956)
{
if (num == 2103908752 && Command == "Divide")
{
return A / B;
}
}
else if (Command == "Substract")
{
return A - B;
}
}
else if (num != 2646845972u)
{
if (num == 2805258597u && Command == "Multiply")
{
return A * B;
}
}
else if (Command == "Add")
{
return A + B;
}
}
else if (num <= 3289118412u)
{
if (num != 3238785555u)
{
if (num == 3289118412u && Command == "A")
{
}
}
else if (Command == "D")
{
}
}
else if (num != 3322673650u)
{
if (num == 3339451269u && Command == "B")
{
}
}
else if (Command == "C")
{
}
return -1;
}
}
[CompilerGenerated]
internal sealed class <PrivateImplementationDetails>
{
internal static uint ComputeStringHash(string s)
{
uint num = default(uint);
if (s != null)
{
num = 2166136261u;
int num2 = 0;
while (num2 < s.Length)
{
num = (s[num2] ^ num) * 16777619;
num2++;
}
}
return num;
}
}
{
"version": 1,
"target": "C#",
"mode": "Release",
"branch": "master"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment