MainPage.xaml.cs
/// <summary>
/// CloseDevice:
/// - Disposes SerialDevice object
/// - Clears the enumerated device Id list
/// </summary>
Disposes SerialDevice object
Clears the enumerated device Id list
Disposes SerialDevice object Clears the enumerated device Id list
private void CloseDevice()
        {
            if (serialPort != null)
            {
                serialPort.Dispose();
            }
            serialPort = null;
            bt_List_Com.IsEnabled = true;
            listOfDevices.Clear();
        }
private void CloseDevice ( ) { if ( serialPort != null ) { serialPort . Dispose ( ) ; } serialPort = null ; bt_List_Com . IsEnabled = true ; listOfDevices . Clear ( ) ; }
CloseDevice:
 Disposes SerialDevice object
 Clears the enumerated device Id list
CloseDevice : Disposes SerialDevice object Clears the enumerated device Id list
//sendTextButton.IsEnabled = false; //rcvdText.Text = "";