UdpClient.Active 属性
定义
获取或设置一个值,该值指示是否已建立默认远程主机。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;否则为 false。true 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.