public ref class SerialPort : System::ComponentModel::Component public class SerialPort : System.ComponentModel.Component type SerialPort = class inherit Component Public Class SerialPort Inherits Component 継承 例 次のコード例では、 クラスを SerialPort 使用して、2 人のユーザーが null モデム ケーブルで接続されている 2 つの個別のコンピューターからチャットできるようにします。 この例では、チャットの前に、ユーザーにポート設定とユーザー名の入力を求められます。 この例の完全な機能を実現するには、両方のコンピューターがプログラムを実行している必要があります。 #us
![SerialPort クラス (System.IO.Ports)](https://cdn-ak-scissors.b.st-hatena.com/image/square/d6e4cb632c7025e9f5e05fd314fbf6dcd6144e8d/height=288;version=1;width=512/https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fmedia%2Fopen-graph-image.png)