thanks and yes you are right , for e.g. for a printer , we have :
PrintDialog pr = new PrintDialog();
string str = pr.PrinterSettings.PrinterName.ToString();
but suppose COM1 , connect to monitor port , how can i get the name of device connect to this port "COM1" , or how can we recognize what device connect to this COM1 .