C# Decimal Multiply Method

Description

Decimal Multiply multiplies two specified Decimal values.

Syntax

Decimal.Multiply has the following syntax.


public static decimal Multiply(
  decimal d1,
  decimal d2
)

Parameters

Decimal.Multiply has the following parameters.

  • d1 - The multiplicand.
  • d2 - The multiplier.

Returns

Decimal.Multiply method returns The result of multiplying d1 and d2.

Example

Example of the decimal.Multiply


//from  ww  w. j av  a2 s .com
using System;

class MainClass
{
    public static void Main( )
    {
        Console.WriteLine( decimal.Multiply( 1000M, 7M ) );
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version