| Visual Basic (Declaration) | |
|---|---|
Public Overloads MustOverride Sub Cancel() | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public abstract void Cancel() | |
| Managed Extensions for C++ | |
|---|---|
public: abstract void Cancel(); | |
| C++/CLI | |
|---|---|
public: abstract void Cancel(); | |
If the conversion has already finished, failed or been cancelled, this call has no effect. Otherwise, this cancels the conversion and releases system resources such as open file handles.
This method is useful if the conversion source is an OutputStreamSource, TextWriterSource or an XmlWriterSource and the application cannot or does not want to close the source normally. In this case, the application should call Cancel to make sure system resources are released.
This method is also useful if the conversion result is an InputStreamResult, TextReaderResult or XmlReaderResult and the application does not want to consume then entire result. In this case, the application should call Cancel() to release system resources.
In addition to cancelling the Conversion, this method attempts to throw a ConverterCancelledException to the conversion data source and conversion data consumer.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family