在C#中以货币格式显示编号 [英] Show number in Currency format in C#

查看:183
本文介绍了在C#中以货币格式显示编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个2879068.
我想以货币格式显示它,例如C#中的 28,79,068
有人可以帮我吗?


markand

I have a number 2879068.
I want to display it in currency format as like 28,79,068 in C#
Can any one help me


markand

推荐答案

我只是在自己学这些东西.

I'm just learning this stuff myself.

这似乎可行:

使用系统;
公共类货币
{
    公共静态void Main()
   {
     Console.WriteLine("{0:C}",2879068);
   }
}

using System;
public class Currency
{
      public static void Main()
   {
      Console.WriteLine("{0:C}", 2879068);
   }
}


这篇关于在C#中以货币格式显示编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆