Thread: C# основной форум/Money Format

Money Format
struct Currency
        {
            public uint Dollars;
            public uint Cents;

            public Currency(uint dollars, ushort cents)
            {
                this.Dollars = dollars;
                this.Cents = cents;
            }

            public override string ToString()
            {
                return string.Format("${0}.{1,-2:00}", Dollars, Cents);
            }



        }



Re: Money Format

 


<%# DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:##0.00}")%>

-- 16/10/2008 09:51:27: post edited by sergey.