diff --git a/xml/System/Math.xml b/xml/System/Math.xml index 281ffbd99c2..22735451b2f 100644 --- a/xml/System/Math.xml +++ b/xml/System/Math.xml @@ -113,7 +113,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/Abs1.cs#1)] + [!code-csharp-interactive[System.Math.Abs#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/Abs1.cs#1)] [!code-vb[System.Math.Abs#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/Abs1.vb#1)] ]]> @@ -177,7 +177,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs2.cs#2)] + [!code-csharp-interactive[System.Math.Abs#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs2.cs#2)] [!code-vb[System.Math.Abs#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs2.vb#2)] ]]> @@ -239,7 +239,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs3.cs#3)] + [!code-csharp-interactive[System.Math.Abs#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs3.cs#3)] [!code-vb[System.Math.Abs#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs3.vb#3)] ]]> @@ -303,7 +303,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs4.cs#4)] + [!code-csharp-interactive[System.Math.Abs#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs4.cs#4)] [!code-vb[System.Math.Abs#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs4.vb#4)] ]]> @@ -367,7 +367,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs5.cs#5)] + [!code-csharp-interactive[System.Math.Abs#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs5.cs#5)] [!code-vb[System.Math.Abs#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs5.vb#5)] ]]> @@ -434,7 +434,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs6.cs#6)] + [!code-csharp-interactive[System.Math.Abs#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs6.cs#6)] [!code-vb[System.Math.Abs#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs6.vb#6)] ]]> @@ -500,7 +500,7 @@ ## Examples The following example uses the method to get the absolute value of a number of values. - [!code-csharp[System.Math.Abs#7](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs7.cs#7)] + [!code-csharp-interactive[System.Math.Abs#7](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Abs/cs/abs7.cs#7)] [!code-vb[System.Math.Abs#7](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Abs/vb/abs7.vb#7)] ]]> @@ -1124,10 +1124,6 @@ ## Remarks The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward positive infinity. -## Examples - -[!INCLUDE[midpoint-rounding](~/includes/csharp-interactive-note.md)] - ]]> @@ -2258,10 +2254,6 @@ Dim i2 As Integer = CInt(Math.Ceiling(d2)) ' Result: 7969 ## Remarks The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward negative infinity. -## Examples - -[!INCLUDE[midpoint-rounding](~/includes/csharp-interactive-note.md)] - ]]> @@ -2943,6 +2935,19 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * Returns the larger of two specified numbers. + + method to return and display the greater of two variables: + +[!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] +[!code-csharp-interactive[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] +[!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] + + ]]> + @@ -2994,18 +2999,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 8-bit unsigned integers to compare. Returns the larger of two 8-bit unsigned integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3057,18 +3051,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two decimal numbers to compare. Returns the larger of two decimal numbers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3120,18 +3103,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two double-precision floating-point numbers to compare. Returns the larger of two double-precision floating-point numbers. Parameter or , whichever is larger. If , , or both and are equal to , is returned. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3183,18 +3155,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 16-bit signed integers to compare. Returns the larger of two 16-bit signed integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3246,18 +3207,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 32-bit signed integers to compare. Returns the larger of two 32-bit signed integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3309,18 +3259,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 64-bit signed integers to compare. Returns the larger of two 64-bit signed integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3375,18 +3314,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 8-bit signed integers to compare. Returns the larger of two 8-bit signed integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3438,18 +3366,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two single-precision floating-point numbers to compare. Returns the larger of two single-precision floating-point numbers. Parameter or , whichever is larger. If , or , or both and are equal to , is returned. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3504,18 +3421,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 16-bit unsigned integers to compare. Returns the larger of two 16-bit unsigned integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3570,18 +3476,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 32-bit unsigned integers to compare. Returns the larger of two 32-bit unsigned integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3636,18 +3531,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 64-bit unsigned integers to compare. Returns the larger of two 64-bit unsigned integers. Parameter or , whichever is larger. - - method to return and display the greater of two variables. - - [!code-cpp[Math.Max#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.max/CPP/max.cpp#1)] - [!code-csharp[Math.Max#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.max/CS/max.cs#1)] - [!code-vb[Math.Max#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.max/VB/max.vb#1)] - - ]]> - + To be added. @@ -3695,6 +3579,19 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * Returns the smaller of two numbers. + + method to return and display the smaller of two variables: + +[!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] +[!code-csharp-interactive[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] +[!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] + + ]]> + @@ -3746,18 +3643,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 8-bit unsigned integers to compare. Returns the smaller of two 8-bit unsigned integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -3809,18 +3695,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two decimal numbers to compare. Returns the smaller of two decimal numbers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -3872,18 +3747,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two double-precision floating-point numbers to compare. Returns the smaller of two double-precision floating-point numbers. Parameter or , whichever is smaller. If , , or both and are equal to , is returned. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -3935,18 +3799,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 16-bit signed integers to compare. Returns the smaller of two 16-bit signed integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -3998,18 +3851,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 32-bit signed integers to compare. Returns the smaller of two 32-bit signed integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4061,18 +3903,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 64-bit signed integers to compare. Returns the smaller of two 64-bit signed integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4127,18 +3958,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 8-bit signed integers to compare. Returns the smaller of two 8-bit signed integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4190,18 +4010,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two single-precision floating-point numbers to compare. Returns the smaller of two single-precision floating-point numbers. Parameter or , whichever is smaller. If , , or both and are equal to , is returned. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4256,18 +4065,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 16-bit unsigned integers to compare. Returns the smaller of two 16-bit unsigned integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4322,18 +4120,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 32-bit unsigned integers to compare. Returns the smaller of two 32-bit unsigned integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4388,18 +4175,7 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * The second of two 64-bit unsigned integers to compare. Returns the smaller of two 64-bit unsigned integers. Parameter or , whichever is smaller. - - method to return and display the smaller of two variables. - - [!code-cpp[Math.Min#1](~/samples/snippets/cpp/VS_Snippets_CLR/math.min/CPP/min.cpp#1)] - [!code-csharp[Math.Min#1](~/samples/snippets/csharp/VS_Snippets_CLR/math.min/CS/min.cs#1)] - [!code-vb[Math.Min#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/math.min/VB/min.vb#1)] - - ]]> - + To be added. @@ -4565,9 +4341,10 @@ Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) * ## Examples + The following example uses the method to calculate the value that results from raising 2 to a power ranging from 0 to 32. - [!code-csharp[System.Math.Pow#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.math.pow/cs/pow1.cs#1)] + [!code-csharp-interactive[System.Math.Pow#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.math.pow/cs/pow1.cs#1)] [!code-vb[System.Math.Pow#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.math.pow/vb/pow1.vb#1)] ]]> @@ -4705,8 +4482,6 @@ In addition to the examples in the [Remarks](#remarks-round) section, this artic [Math.Round(Decimal, Int32, MidpointRounding)](#Round7_Example) [Math.Round(Double, Int32, MidpointRounding)](#Round8_Example) -[!INCLUDE[midpoint-rounding](~/includes/csharp-interactive-note.md)] - ]]> @@ -6095,9 +5870,10 @@ The following example demonstrates how to use the @@ -6246,7 +6022,7 @@ The following example demonstrates how to use the + ]]> @@ -6299,7 +6075,7 @@ The following example demonstrates how to use the method to truncate both a positive and a negative value. - [!code-csharp[System.Math.Truncate#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Truncate/cs/Truncate1.cs#2)] + [!code-csharp-interactive[System.Math.Truncate#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Truncate/cs/Truncate1.cs#2)] [!code-vb[System.Math.Truncate#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Truncate/vb/Truncate1.vb#2)] ]]> @@ -6368,7 +6144,7 @@ Dim i As Integer = CInt(Math.Truncate(d)) ' Result: 164 ## Examples The following example calls the method to truncate both a positive and a negative value. - [!code-csharp[System.Math.Truncate#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Truncate/cs/Truncate1.cs#1)] + [!code-csharp-interactive[System.Math.Truncate#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Math.Truncate/cs/Truncate1.cs#1)] [!code-vb[System.Math.Truncate#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Math.Truncate/vb/Truncate1.vb#1)] ]]>