public void beginTask(String title, int totalWork) {if (!isMainThread())throw new IllegalStateException();pm.beginTask(title, totalWork);}

public override void BeginTask(string title, int totalWork){if (!IsMainThread()){throw new InvalidOperationException();}pm.BeginTask(title, totalWork);}
