Blog

Output of following code:

class Program {
struct CalCulateStr {
public int Num1,Num2;

public int DoSomething() {
return Num1 / Num2;
}
}

Unsafe static void Main(string[] args) {
CalCulateStr CalStruct = new CalCulateStr();
CalCulateStr* ResultStruct;
ResultStruct = &CalStruct;
ResultStruct -> Num1 = 120;
ResultStruct -> Num2 = 18;
int finaly = 4;
var res = ResultStruct->DoSomething() * finaly;
Console.WriteLine(res);
}
}