When I build my .NET application, what will the assembly contain? CIL? And second question, when doing the same thing in different .NET langugaes, will the CIL be exactly the same or same in the terms of similarity that works exactly the same way? Thanks
No, they won't be the same.
VB.Net uses helper methods in Microsoft.VisualBasic.dll instead of many IL instructions to achieve VB semantics.
This includes equality ("" = Nothing
), certain string operations, and I don't remember what else.
You can not guarantee that VB.Net and C# will boil down to the same IL, but provided you wrote functionally identical routines, the IL could produce the same result.
For many methods, the compiled result (CIL) will be the same.
There are however constructs in either language that are solved differently, or just not possible. This can never result in the same instructions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With