怎么动态的把数字转换成带圆圈的数字,比如1-->①

toploveall 2010-10-26 02:14:38
如题所示
...全文
873 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
hezhanglin 2010-10-26
  • 打赏
  • 举报
回复
5楼的太复杂,你直接 ToString().RecaseAll('1','①').RecaseAll('2','2').xxxxx;这样具体的替换方法名我也不记得了
fellowcheng 2010-10-26
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 wuyq11 的回复:]

string[] arr= { "①"...};
string resultStr = string.Empty;
foreach (char str in num.ToString())
{
resultStr += arr[Int32.Parse(str.ToString()) - 1];
}
resultStr += (char)(931……
[/Quote]
+1
wuyq11 2010-10-26
  • 打赏
  • 举报
回复
string[] arr= { "①"...};
string resultStr = string.Empty;
foreach (char str in num.ToString())
{
resultStr += arr[Int32.Parse(str.ToString()) - 1];
}
resultStr += (char)(9312+Int32.Parse(str.ToString())-1);
wuhuabucai 2010-10-26
  • 打赏
  • 举报
回复
链接 http://www.cnblogs.com/msnadair/archive/2009/04/15/1436544.html
toploveall 2010-10-26
  • 打赏
  • 举报
回复
问题不会就这么沉底了吧,我不会转ASCII。
马老虎 2010-10-26
  • 打赏
  • 举报
回复
ASCII转
toploveall 2010-10-26
  • 打赏
  • 举报
回复
要是有更多的转换也挺好的,
比如
1--->①或者I(罗马数字)或者更多
要动态的
340--->带圈的340

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧