public void sendres(int code, string errormsg) { if (errorcore_ != null) { if (flag == -1) { errorcore_(code, errormsg); flag = 1; } } }