bool _rebootCamera() { bool ret = false; int count = 0; //get logsytem var prop_logsystem = testingInfo.GetType().GetProperty("logSystem"); string log_value = (string)prop_logsystem.GetValue(testingInfo); //reboot camera log_value += string.Format("\n-------------------------------\n"); log_value += string.Format("{0}, reboot camera\n", DateTime.Now); prop_logsystem.SetValue(testingInfo, log_value); count = 0; RE_REBOOT: count++; ret = camera.rebootViaUboot(); if (!ret) { if (count < 3) { goto RE_REBOOT; } } return(ret); }