+=
演算子を使用すると、アクションはを同期して実行しますかまたはを非同期に実行しますか?複数のアクションアサティンメントアディションは同期して実行されますか?
Action actions =() => Console.WriteLine("First Action");
actions +=() => Console.WriteLine("Second Action");
actions +=() => Console.WriteLine("Third Action");
actions +=() => Console.WriteLine("Fourth Action");
actions();
コードプリントのこのブロック:
First Action
Second Action
Third Action
Fourth Action
アクションのための '+ ='はデリゲートと同じように機能します - それは段階的に実行される "リスト"の種類を作成します – VMAtm