-
In some cases, ILSpy incorrectly decompile property set access right after another property get acces of same instance.
Test case:
``` c#
namespace IlSpyBug
{
public class IssueSample
{
…
-
When decompiling this:
``` csharp
public struct Something
{
public int X;
public unsafe int Method()
{
return ((Something*)0)->X;
}
}
```
ILSpy 2.3.1.1855 outputs:
``` csha…
-
e.g. redundant cast from object to object:
``` C#
// System.Linq.Enumerable
private static IEnumerable CastIterator(IEnumerable source)
{
foreach (object current in source)
{
yield re…
-
A fragment of the IL code:
ldloc.0
ldloc.1
ldarg.1
ldloc.2
ldc.i4.1
add
ldelem.u1
ldc.i4.s 64
add
conv.u1
stelem.i1
decompilers as:
array[num] = buffer[…
-
In class System.Windows.Forms.Design.TabControlDesigner in assembly System.Design.dll in method OnAdd is ILSpy not showing the assignment to SelectedIndex.
The code line which ILSpy shows is:
tabCon…
-
``` javascript
class Program
{
static void Main(string[] args)
{
}
}
public interface IAsyncCommand
{
Task ExecuteAsync();
}
public class…
-
class Program
{
static void Main(string[] args)
{
IntPtr ip = new IntPtr();
ip.ToInt32();
ip.ToString();
Test(new IntPtr());
}
public static vo…
-
Source:
private static void Main(string[] args)
{
Console.WriteLine(0xffffeeeeL);
Console.ReadKey();
}
Output is 4294962926
Decompile:
private static void Mai…
-
Suppose you have the following interfaces:
```c#
interface IBase {
int Property { get; }
}
interface IDerived : IBase {
new int Property { get; } // this hides IBase.Property
}
```
A po…
-
If the compiler generates code, like anonymous methods, the methods created by the compiler use characters like '$'. When ILSpy converts these functions into C#, the names remain, cause illegal names …