/// <summary> /// StopBit Enum 형태로 변환 /// </summary> /// <param name="value"></param> /// <returns></returns> public static StopBits String2stopBits(string value) { StopBits enStopBits = StopBits.One; value = value.ToUpper(); Type type = enStopBits.GetType(); foreach (StopBits e in Enum.GetValues(type)) //Parity.GetType())) { if (value == e.ToString().ToUpper()) { enStopBits = e; break; } } return(enStopBits); }