public static bool TryParse(string value, out StudyInterventionModel result) { result = default(StudyInterventionModel); if (value == "cross-over") { result = StudyInterventionModel.CrossOver; } else if (value == "factorial") { result = StudyInterventionModel.Factorial; } else if (value == "parallel") { result = StudyInterventionModel.Parallel; } else if (value == "single group") { result = StudyInterventionModel.SingleGroup; } else { return(false); } return(true); }
public static string ToString(StudyInterventionModel value) { if (value == StudyInterventionModel.CrossOver) { return("cross-over"); } else if (value == StudyInterventionModel.Factorial) { return("factorial"); } else if (value == StudyInterventionModel.Parallel) { return("parallel"); } else if (value == StudyInterventionModel.SingleGroup) { return("single group"); } else { throw new ArgumentException("Unrecognized StudyInterventionModel value: " + value.ToString()); } }
public static bool TryParse(string value, out StudyInterventionModel result) { result = default(StudyInterventionModel); if( value=="cross-over") result = StudyInterventionModel.CrossOver; else if( value=="factorial") result = StudyInterventionModel.Factorial; else if( value=="parallel") result = StudyInterventionModel.Parallel; else if( value=="single group") result = StudyInterventionModel.SingleGroup; else return false; return true; }
public static string ToString(StudyInterventionModel value) { if( value==StudyInterventionModel.CrossOver ) return "cross-over"; else if( value==StudyInterventionModel.Factorial ) return "factorial"; else if( value==StudyInterventionModel.Parallel ) return "parallel"; else if( value==StudyInterventionModel.SingleGroup ) return "single group"; else throw new ArgumentException("Unrecognized StudyInterventionModel value: " + value.ToString()); }