Selasa, 25 Januari 2011

Asynchronous Control Updates In C#/.NET/WinForms

Every .NET WinForms project I've written, since .NET 2.0, has included some form of this code:public static class ControlExtensions{  public static void Do(this TControl control, Action action)    where TControl: Control  {    if (control.InvokeRequired)      control.Invoke(action, control);    else      action(control);  }}It's a simple extension method that allows any UI

Tidak ada komentar:

Posting Komentar