|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
TimeoutException (Clase)
System.Exception
System.SystemException
System.TimeoutException
System.Text.RegularExpressions.RegexMatchTimeoutException
Espacio de nombres: System
Ensamblado: mscorlib (en mscorlib.dll)
El tipo TimeoutException expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() ![]() ![]() ![]() | TimeoutException() | |
![]() ![]() ![]() ![]() | TimeoutException(String) | |
![]() | TimeoutException(SerializationInfo, StreamingContext) | |
![]() ![]() ![]() ![]() | TimeoutException(String, Exception) |
| Nombre | Descripción | |
|---|---|---|
![]() ![]() ![]() | Data | |
![]() ![]() ![]() | HelpLink | |
![]() ![]() ![]() ![]() | HResult | |
![]() ![]() ![]() ![]() | InnerException | |
![]() ![]() ![]() ![]() | Message | |
![]() ![]() ![]() | Source | |
![]() ![]() ![]() ![]() | StackTrace | |
![]() | TargetSite |
| Nombre | Descripción | |
|---|---|---|
![]() ![]() ![]() ![]() | Equals(Object) | |
![]() ![]() ![]() ![]() | Finalize | |
![]() ![]() ![]() ![]() | GetBaseException | |
![]() ![]() ![]() ![]() | GetHashCode | |
![]() | GetObjectData | |
![]() ![]() ![]() ![]() | GetType | En XNA Framework 3.0, este miembro se hereda de Object.GetType(). En Biblioteca de clases portable Biblioteca de clases portable, este miembro se hereda de Object.GetType(). En .NET para aplicaciones de la Tienda Windows Windows 8, este miembro se hereda de Object.GetType(). |
![]() ![]() ![]() ![]() | MemberwiseClone | |
![]() ![]() ![]() ![]() | ToString |
| Nombre | Descripción | |
|---|---|---|
![]() | SerializeObjectState |
// This example demonstrates the use of the TimeoutException // exception in conjunction with the SerialPort class. using System; using System.IO.Ports; class Sample { public static void Main() { string input; try { // Set the COM1 serial port to speed = 4800 baud, parity = odd, // data bits = 8, stop bits = 1. SerialPort sp = new SerialPort("COM1", 4800, Parity.Odd, 8, StopBits.One); // Timeout after 2 seconds. sp.ReadTimeout = 2000; sp.Open(); // Read until either the default newline termination string // is detected or the read operation times out. input = sp.ReadLine(); sp.Close(); // Echo the input. Console.WriteLine(input); } // Only catch timeout exceptions. catch (TimeoutException e) { Console.WriteLine(e); } } } /* This example produces the following results: (Data received at the serial port is echoed to the console if the read operation completes successfully before the specified timeout period expires. Otherwise, a timeout exception like the following is thrown.) System.TimeoutException: The operation has timed-out. at System.IO.Ports.SerialStream.ReadByte(Int32 timeout) at System.IO.Ports.SerialPort.ReadOneChar(Int32 timeout) at System.IO.Ports.SerialPort.ReadTo(String value) at System.IO.Ports.SerialPort.ReadLine() at Sample.Main() */
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.



