Source code
class Program
{
static void Main(string[] args)
{
int add = Add(20, 10);
int sub = Subtract(20, 10);
int multiply = Multiply(20, 10);
int divide = Divide(20, 10);
// Issue here
int modulo = Modulo(20, 10);
}
static int Add(int i, int j) => i + j;
static int Subtract(int i, int j) => i - j;
static int Multiply(int i, int j) => i * j;
static int Divide(int i, int j) => i / j;
static int Modulo(int i, int j) => i % j;
}
Steps to reproduce
- Compile the above source code into a DLL.
- Run
dotnet ildasm on the DLL.
Expected IL
Actual IL
IL_0032: stloc.s class V_4
Error
When running ILAsm : MSIL.il(60) : error : syntax error at token 'class' in: IL_0032: stloc.s class V_4
Works well with traditional ILDAsm.
Source code
Steps to reproduce
dotnet ildasmon the DLL.Expected IL
Actual IL
Error
When running ILAsm :
MSIL.il(60) : error : syntax error at token 'class' in: IL_0032: stloc.s class V_4Works well with traditional ILDAsm.