Using Decimal constructor : Decimal « Data Type « Visual C++ .NET






Using Decimal constructor

 

#include "stdafx.h"
using namespace System;

void main()
{
    Decimal e(0, 1, 2,                          // digits
              ((3 & 0x80000000) == 0x80000000), // sign
              ((3 >> 16) & 0xff) );             // decimal location


    Console::WriteLine( e );                 

}

   
  








Related examples in the same category

1.Cast to decimal
2.Decimal calculation
3.Decimal constructor
4.Break decimal up into 4 parts
5.Decimal literal assigned