SynchronizationContext.Current

WinForms(Windowsフォームアプリケーション)の場合、SynchronizationContext.Currentはどうなるか。

SynchronizationContext.Current プロパティ (System.Threading) | Microsoft Docs

WinFormsのプロジェクト久しぶり過ぎて、

アンダースコア('_')付けないと、名前空間とクラス名が被ってしまうの注意するの忘れてた。
アンダースコア('_')付けないと、名前空間とクラス名が被ってしまうの注意するの忘れてた。

アンダースコア('_')付けないと、名前空間とクラス名が被ってしまうの注意するの忘れてた。

MessageBoxでSynchronizationContext.Currentを見ると、

nullじゃなくて、WindowsFormsSynchronizationContextになっている。
nullじゃなくて、WindowsFormsSynchronizationContextになっている。

nullじゃなくて、WindowsFormsSynchronizationContextになっている。

Sample/dotnet/SynchronizationContext/Current/src/SynchronizationContext_ at master · bg1bgst333/Sample · GitHub