AForge.Robotics.Lego.Internals.SerialCommunication.Connect C# (CSharp) Method

Connect() public method

Connect to NXT brick.
If communication interface was connected before the call, existing connection will be reused. If it is required to force reconnection, then Disconnect method should be called before.
public Connect ( ) : bool
return bool
        public bool Connect( )
        {
            if ( !port.IsOpen )
            {
                // try to connect 
                try
                {
                    port.Open( );
                }
                catch
                {
                    return false;
                }
            }
            return true;
        }