在C#中,BigMul()是方法類方法。此方法用於計算兩個32位數字的全積。
用法:
public static long BigMul(int a, int b)
參數:
- a:這是第一個要相乘的數字,並且此參數的類型為System.Int32。
b:這是要相乘的第二個數字,並且此參數的類型為System.Int32。 
返回類型:此方法返回一個包含指定數字乘積的數字,並且此方法的返回類型為System.Int64。
例:
// C# program to demonstarte the  
// Math.BigMul() method 
using System; 
namespace ConsoleApplication1 { 
  
class Geeks { 
  
    // Main Method 
    static void Main(string[] args) 
    { 
  
        // defining two variable of type 
        //  System.Int32 
        Int32 x1 = 233232322; 
        Int32 x2 = 189222338; 
  
        // Using BigMul( ) method and storing  
        // result into a long(Int64) variable 
        long product = Math.BigMul(x1, x2); 
  
        // Getting the output 
        Console.WriteLine("The product of the two numbers is " + product); 
    } 
} 
}
輸出:
The product of the two numbers is 44132765266008836
相關用法
- C# DateTimeOffset.Add()用法及代碼示例
 - C# String.Contains()用法及代碼示例
 - C# Math.Sin()用法及代碼示例
 - C# Math.Cos()用法及代碼示例
 - C# Dictionary.Add()用法及代碼示例
 - C# Math.Tan()用法及代碼示例
 - C# Math.Abs()方法用法及代碼示例
 - C# Math.Exp()用法及代碼示例
 - C# Math.Abs()函數用法及代碼示例
 
注:本文由純淨天空篩選整理自keshav_786大神的英文原創作品 C# | Math.BigMul() Method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
