Decimal.ToOACurrency(Decimal) Method is used to convert the specified Decimal value to the equivalent OLE Automation Currency value, which is contained in a 64-bit signed integer.
Syntax: public static long ToOACurrency (decimal value);
Here, it takes the decimal number to convert.
Return Value: This method returns a 64-bit signed integer that contains the OLE Automation equivalent of value.
Below programs illustrate the use of Decimal.ToOACurrency() Method
Equivalent long value is 400000
Equivalent long value are respectivily 200000 300000 400000 42949672950000
- Difference between Method Overriding and Method Hiding in C#
- C# | Remove() Method
- Extension Method in C#
- C# | String.Contains() Method
- C# | CompareOrdinal() Method
- C# | ToLower() Method
- TimeSpan.Add() Method in C#
- Stack.Pop() Method in C#
- Method Hiding in C#
- C# | Method Overriding
- C# | Insert() Method
- C# | Replace() Method
- C# | IsNullOrWhiteSpace() Method
- C# | ToCharArray() Method
- C# | SortedDictionary.Add() Method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.