Export (0) Print
Expand All

Math.BigMul Method

Produces the full product of two 32-bit numbers.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Public Shared Function BigMul ( _
	a As Integer, _
	b As Integer _
) As Long


Type: System.Int32

The first number to multiply.

Type: System.Int32

The second number to multiply.

Return Value

Type: System.Int64
The number containing the product of the specified numbers.

The following example demonstrates the use of the BigMul method to calculate the product of two integer values.

' This example demonstrates Math.BigMul() 
Imports System

Class Sample
   Public Shared Sub Main()
      Dim int1 As Integer = Int32.MaxValue
      Dim int2 As Integer = Int32.MaxValue
      Dim longResult As Long 
      longResult = Math.BigMul(int1, int2)
      Console.WriteLine("Calculate the product of two Int32 values:")
      Console.WriteLine("{0} * {1} = {2}", int1, int2, longResult)
   End Sub 'Main
End Class 'Sample

'This example produces the following results: 
'Calculate the product of two Int32 values: 
'2147483647 * 2147483647 = 4611686014132420609 

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft