Skip to content

Doesn't show StateMachine for async/await in C# mode #801

@egorikas

Description

@egorikas

I have problems with decompiling a console application which is using .net 4.6 and async/await. My ILSpy version is 2.4.0.1963.

I have a simple class

    public class Example
    {
        public async Task ShowStateMachine()
        {
            FirstSync();
            await Task.Delay(500);
            SecondSync();
        }

        public void FirstSync()
        {
            Console.WriteLine("First");
        }

        public void SecondSync()
        {
            Console.WriteLine("Second");
        }
    }

But when I open ILSPy in C#-mode, I can't go to the statemachine

c mode

But it exists in IL-mode

il mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions