.NET Framework Class Library OpCodes..::.Brtrue_S Field Transfers control to a target instruction (short form) if value is true, not null, or non-zero.
Namespace:
System.Reflection.Emit
Assembly:
mscorlib (in mscorlib.dll)

Syntax
Public Shared ReadOnly Brtrue_S As OpCode
public static readonly OpCode Brtrue_S
public:
static initonly OpCode Brtrue_S
static val Brtrue_S: OpCode

Remarks
The following table lists the instruction's hexadecimal and Microsoft Intermediate Language (MSIL) assembly format, along with a brief reference summary: Format | Assembly Format | Description |
|---|
2D < int8 > | brtrue.s target brinst.s target | Branch to a target instruction at the specified offset if non-zero (true), short form. |
The stack transitional behavior, in sequential order, is:
value is pushed onto the stack by a previous operation.
value is popped from the stack; if value is true, branch to target.
The brtrue.s instruction transfers control to the specified target instruction if value (type native int) is nonzero (true). If value is zero (false) execution continues at the next instruction. If value is an object reference (type O) then brinst (an alias for brtrue) transfers control if it represents an instance of an object (for example, if it is not the null object reference; see Ldnull). The target instruction is represented as a 1-byte signed offset from the beginning of the instruction following the current instruction. Control can only be transferred to the first of these prefixes if the target instruction has one or more prefix codes. Control transfers into and out of try, catch, filter, and finally blocks cannot be performed by this instruction. The following Emit method overload can use the brtrue.s opcode:

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

See Also
|
Biblioteca de clases de .NET Framework OpCodes..::.Brtrue_S (Campo) Transfiere el control a una instrucción máquina de destino (forma corta) si value es true, no es null o es distinto de cero.
Espacio de nombres:
System.Reflection.Emit
Ensamblado:
mscorlib (en mscorlib.dll)

Sintaxis
Public Shared ReadOnly Brtrue_S As OpCode
public static readonly OpCode Brtrue_S
public:
static initonly OpCode Brtrue_S
static val Brtrue_S: OpCode

Comentarios
En la tabla siguiente, se muestra el ensamblado de la instrucción máquina en formato hexadecimal y en formato de Lenguaje intermedio de Microsoft (MSIL), junto con un breve resumen de referencia: Format | Formato del ensamblado | Descripción |
|---|
2D < int8 > | brtrue.s target brinst.s target | Realiza una bifurcación para una instrucción máquina de destino en el desplazamiento especificado si es distinto de cero (true) (forma corta). |
El comportamiento transicional de la pila es, por orden secuencial:
Una operación anterior inserta value en la pila.
value se extrae de la pila; si value es true, se bifurca en target.
La instrucción máquina brtrue.s transfiere el control a la instrucción máquina de destino especificada si value (tipo native int) es distinto de cero (true). Si value es cero (false), la ejecución continúa en la instrucción máquina siguiente. Si value es una referencia a objeto (tipo O), brinst (alias de brtrue) transfiere el control cuando representa una instancia de un objeto (por ejemplo, si no es una referencia a objeto nula; vea Ldnull). La instrucción máquina de destino está representada por un desplazamiento de 1 byte con signo desde el principio de la instrucción máquina posterior a la instrucción máquina actual. Si la instrucción máquina de destino tiene como prefijo uno o más códigos, el control sólo se puede transferir al primero de estos prefijos. Esta instrucción máquina no puede realizar transferencias de control a los bloques try, catch, filter y finally ni desde los mismos. La siguiente sobrecarga del método Emit puede utilizar el código de operación brtrue.s:

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.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.

Vea también
|