UdpClient.Active UdpClient.Active UdpClient.Active UdpClient.Active Property

定義

取得或設定值,指出是否已經建立預設的遠端主機。Gets or sets a value indicating whether a default remote host has been established.

protected:
 property bool Active { bool get(); void set(bool value); };
protected bool Active { get; set; }
member this.Active : bool with get, set
Protected Property Active As Boolean

屬性值

如果連接為作用中,則為 true,否則為 falsetrue if a connection is active; otherwise, false.

備註

衍生自UdpClient的類別可以使用這個屬性來判斷是否已建立預設遠端主機。Classes deriving from UdpClient can use this property to determine if a default remote host has been established. 您可以使用適當的函式或藉由呼叫Connect方法來建立預設遠端主機。You can establish a default remote host by using the appropriate constructor or by calling the Connect method. 如果您建立了預設的遠端主機,您就無法在對的呼叫Send中指定遠端主機。If you do establish a default remote host, you cannot specify a remote host in your call to Send.

適用於

另請參閱