//serialportclass serialport sp =new Seriaport("COM1");(and other settings too) private void PortOpen() { sp.Open(); //access is denied } private void PortClose() { sp.Close(); } public List<string> GetAllportNames() { List<string> lst =new List<string>(); foreach(var item in Serilport.GetPortNames()) { lst.Add(item); } return lst; } In UI In WindowLoaded Event serialportclass spobj=new serialportclass(); Combobox1.ItemsSource=spobj.GetAllportNames(); //how can i access combobox selecteditem to serialportclass's COMport as show in above....
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)