VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/decimal-fromoacurrency-method-in-c-sharp/

⇱ Decimal.FromOACurrency() Method in C# - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Decimal.FromOACurrency() Method in C#

Last Updated : 11 Jul, 2025

Decimal.FromOACurrency() Method is used to convert the specified 64-bit signed integer that contains an OLE Automation Currency value, to the equivalent Decimal value.

Syntax: public static decimal FromOACurrency (long cy); Here, it takes an OLE Automation Currency value. 

Return Value: This method returns a Decimal that contains the equivalent of cy.

Below programs illustrate the use of Decimal.FromOACurrency(Int64) Method: 

Example 1: 

Output:
Equivalent decimal value is 922337203685477.5807

Example 2: 

Output:
Equivalent decimal value are respectively
922337203685477.5807
-922337203685477.5808
123456789098765.4321
429496.7295

Reference:

Comment
Article Tags:

Explore