如何生成所有字符串列表? enum MyEnum { a = 0, b, c, d, e, f, g, h, i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z } 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Stack<int> s = new Stack<int>(); for (int i = 1; i < 30; i++) { int j = i; int p = 0; while (j > 0) { int k = (j-1) % 26; s.Push(k); j = (j - 1) / 26; p++; } p = 0; string str = string.Empty; while (s.Count != 0) { str += Enum.Parse(typeof(MyEnum), s.Pop().ToString()).ToString(); } Console.WriteLine(str); str = string.Empty; //Console.WriteLine(Enum.Parse(typeof(MyEnum), i.ToString())); } 穷举得完吗???楼主参考这个帖子。。http://topic.csdn.net/u/20081029/09/d6b7e751-55f1-4bd0-8b1c-c0ecd3d14e25.html 保存表头自动编号及表体关联 c# 异常处理 怎样把mainForm 的页面登录信息,提交到下一页面query ?我用过指针,指向下一页面。还有别的办法吗? 关于处理键盘消息的处理问题!!! 如果见"red"转移成"FF0000" c#中如何实现电子盖章? directshow h264 file.exists的问题,如何判断一个文件是否存在 请问在c#中怎样得到当前的系统时间?在线等,多谢 各位帮我推荐一下学习C#的书籍吧!市场上的书太多了,不知道孰好孰坏!! 在datalist添加了一个判断的label... gridview 编辑之后,无法保存?
Stack<int> s = new Stack<int>(); for (int i = 1; i < 30; i++)
{
int j = i;
int p = 0;
while (j > 0)
{
int k = (j-1) % 26;
s.Push(k);
j = (j - 1) / 26;
p++;
}
p = 0;
string str = string.Empty;
while (s.Count != 0)
{
str += Enum.Parse(typeof(MyEnum), s.Pop().ToString()).ToString();
}
Console.WriteLine(str);
str = string.Empty;
//Console.WriteLine(Enum.Parse(typeof(MyEnum), i.ToString()));
}
楼主参考这个帖子。。
http://topic.csdn.net/u/20081029/09/d6b7e751-55f1-4bd0-8b1c-c0ecd3d14e25.html