public static SerialPortConfigItem GetConfigItem(SerialPortConfigItemName itemName) { SerialPortConfigItem spci = null; string name = Enum.GetName(typeof(SerialPortConfigItemName) , itemName); spci = new SerialPortConfigItem(name); ConfigManager.SetSerialPortConfigurnation(ref spci); return(spci); }