Skip to content

Commit 679d507

Browse files
Sergio0694mairaw
andcommitted
Add sbyte overload when using Ldc_I4_S (#3216)
* Add sbyte overload when using Ldc_I4_S The `ldc.i4.s` opcode accepts values in the range `[-128,127]`, but the docs only showed the overload with the `byte` parameter as supported when using this opcode. This was confusing for users (including me), since negative values can't obviously be cast to `byte`. The `sbyte` overload works too when using this opcode. * Update xml/System.Reflection.Emit/OpCodes.xml Co-Authored-By: MSDN.WhiteKnight <[email protected]> * Update xml/System.Reflection.Emit/OpCodes.xml Co-Authored-By: Maira Wenzel <[email protected]> * Update xml/System.Reflection.Emit/OpCodes.xml Co-Authored-By: Maira Wenzel <[email protected]> * Update xml/System.Reflection.Emit/OpCodes.xml Co-Authored-By: Maira Wenzel <[email protected]>
1 parent 477a3e0 commit 679d507

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xml/System.Reflection.Emit/OpCodes.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6827,9 +6827,10 @@
68276827

68286828
`ldc.i4.s` is a more efficient encoding for pushing the integers from -128 to 127 onto the evaluation stack.
68296829

6830-
The following <xref:System.Reflection.Emit.ILGenerator.Emit%2A> method overload can use the `ldc.i4.s` opcode:
6830+
The following <xref:System.Reflection.Emit.ILGenerator.Emit%2A> method overloads can use the `ldc.i4.s` opcode:
68316831

6832-
- ILGenerator.Emit(OpCode, byte)
6832+
- <xref:System.Reflection.Emit.ILGenerator.Emit(System.Reflection.Emit.OpCode,System.Byte)?displayProperty=nameWithType>
6833+
- <xref:System.Reflection.Emit.ILGenerator.Emit(System.Reflection.Emit.OpCode,System.SByte)?displayProperty=nameWithType>
68336834

68346835
]]></format>
68356836
</remarks>

0 commit comments

Comments
 (0)