public static void RefreshBar(IntPtr bar) { if (bar == IntPtr.Zero) { throw new ArgumentOutOfRangeException("bar"); } if (!NativeMethods.TwRefreshBar(bar)) { throw new AntTweakBarException("TwRefreshBar failed."); } }