如何格式化数字字符串?

How to format numeric string?
2020-10-25
  •  译文(汉语)
  •  原文(英语)

我没有格式的文字是: 100000.00

我将其格式化为:("0:0,0 POINT")并且希望将其格式化为:100,000POINT

但是我没有运气.那么,如何将其格式化为100,000POINT?

txtpoint.Text = string.Format("{0:0,0} POINT",(table_ca.Compute("SUM(POINT)", "")).ToString());
速聊1:
编辑您的问题,以包括您的实际代码.感谢您提高问题的参考价值并使其更易于回答!
速聊2:
谢谢.我改善了我的问题!
速聊3:
什么table_ca.Compute("SUM(POINT)", "")的回报?
速聊4:
它从数据表中返回一个cmd选择,但是我已经通过@Ruskin的帮助完成了.谢谢.
解决过程1

这是你想要的?

string.Format("{0:n0} POINT", 100000)
速聊1:
这可能是正确的,但是通常最好等到问题足够清楚才能正确回答为止.
速聊2:
我正在尝试您的代码,但无法正常工作,请在下面查看我的代码.谢谢你的帮助,我的朋友!

My text with not format is: 100000.00

I format it to: ("0:0,0 POINT") and I want it to: 100,000 POINT

But I have no luck. So, how can it format it to 100,000 POINT?

txtpoint.Text = string.Format("{0:0,0} POINT",(table_ca.Compute("SUM(POINT)", "")).ToString());
Talk1:
Please edit your question to include your actual code. Thanks for improving the question's reference value and making it more answerable!
Talk2:
Thanks you. I improved my question !
Talk3:
What does table_ca.Compute("SUM(POINT)", "") return?
Talk4:
It's return a cmd select from datatable But i'm done by @Ruskin's helping. Thank you.
Solutions1

Is this what you are looking for?

string.Format("{0:n0} POINT", 100000)
Talk1:
This might be right, but it's generally best to wait until the question is actually clear enough to answer correctly.
Talk2:
I'm try with your code but it's not working, please view my code below. Thank for your help, my friend !!!
转载于:https://stackoverflow.com/questions/30448092/how-to-format-numeric-string

本人是.net程序员,因为英语不行,使用工具翻译,希望对有需要的人有所帮助
如果本文质量不好,还请谅解,毕竟这些操作还是比较费时的,英语较好的可以看原文

留言回复
我们只提供高质量资源,素材,源码,坚持 下了就能用 原则,让客户花了钱觉得值
上班时间 : 周一至周五9:00-17:30 期待您的加入