Await.Program.XAsync C# (CSharp) Méthode

XAsync() static private méthode

static private XAsync ( ) : Task
Résultat Task
        static async Task<int> XAsync()
        {
            // async が付いたメソッド内では ↑ の await 型は使えない
            var x = new await(); // コンパイル エラー

            // どうしても使いたかったら @ を付けてエスケープ
            var y = new @await(); // これならコンパイルできる
        }
#endif
Program