WebRequest.Abort WebRequest.Abort WebRequest.Abort WebRequest.Abort Method

定义

中止请求。Aborts the request.

public:
 virtual void Abort();
public virtual void Abort ();
abstract member Abort : unit -> unit
override this.Abort : unit -> unit
Public Overridable Sub Abort ()

异常

当未在子类中重写该方法时,试图访问该方法。Any attempt is made to access the method, when the method is not overridden in a descendant class.

注解

Abort方法取消BeginGetResponse通过方法启动的对 Internet 资源的异步请求。The Abort method cancels asynchronous requests to Internet resources started with the BeginGetResponse method.

备注

类是一个abstract类。 WebRequestThe WebRequest class is an abstract class. WebRequest实例在运行时的实际行为由WebRequest.Create方法返回的子代类确定。The actual behavior of WebRequest instances at run time is determined by the descendant class returned by the WebRequest.Create method. 有关默认值和异常的详细信息,请参阅子代类的文档,例如HttpWebRequest和。 FileWebRequestFor more information about default values and exceptions, see the documentation for the descendant classes, such as HttpWebRequest and FileWebRequest.

适用于