Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Berechnet das vollständige Produkt aus zwei 32-Bit-Zahlen.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Function BigMul ( _
a As Integer, _
b As Integer _
) As Long
'Usage
Dim a As Integer
Dim b As Integer
Dim returnValue As Long
returnValue = Math.BigMul(a, b)
public static long BigMul (
int a,
int b
)
public:
static long long BigMul (
int a,
int b
)
public static long BigMul (
int a,
int b
)
public static function BigMul (
a : int,
b : int
) : long
Parameter
- a
Die erste zu multiplizierende Int32.
- b
Die zweite zu multiplizierende Int32.
Rückgabewert
Die Int64, die das Produkt der angegebenen Zahlen enthält.
Beispiel
' 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
'
// This example demonstrates Math.BigMul()
using System;
class Sample
{
public static void Main()
{
int int1 = Int32.MaxValue;
int int2 = Int32.MaxValue;
long longResult;
//
longResult = Math.BigMul(int1, int2);
Console.WriteLine("Calculate the product of two Int32 values:");
Console.WriteLine("{0} * {1} = {2}", int1, int2, longResult);
}
}
/*
This example produces the following results:
Calculate the product of two Int32 values:
2147483647 * 2147483647 = 4611686014132420609
*/
// This example demonstrates Math.BigMul()
using namespace System;
int main()
{
int int1 = Int32::MaxValue;
int int2 = Int32::MaxValue;
Int64 longResult;
//
longResult = Math::BigMul( int1, int2 );
Console::WriteLine( "Calculate the product of two Int32 values:" );
Console::WriteLine( "{0} * {1} = {2}", int1, int2, longResult );
}
/*
This example produces the following results:
Calculate the product of two Int32 values:
2147483647 * 2147483647 = 4611686014132420609
*/
// This example demonstrates Math.BigMul()
import System.*;
class Sample
{
public static void main(String[] args)
{
int int1 = Int32.MaxValue;
int int2 = Int32.MaxValue;
long longResult;
//
longResult = System.Math.BigMul(int1, int2);
Console.WriteLine("Calculate the product of two Int32 values:");
Console.WriteLine("{0} * {1} = {2}", System.Convert.ToString(int1),
System.Convert.ToString(int2), System.Convert.ToString(longResult));
} //main
} //Sample
/*
This example produces the following results:
Calculate the product of two Int32 values:
2147483647 * 2147483647 = 4611686014132420609
*/
Plattformen
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1