bernard 最近的时间轴更新
bernard

bernard

V2EX 第 130802 号会员,加入于 2015-08-05 11:27:07 +08:00
bernard 最近回复了
2015-08-05 13:27:19 +08:00
回复了 xiaobetty 创建的主题 推广 晒出你最蠢的一段代码,送 Cherry 鼠标垫
Hashtable tempht=new Hashtable();
if(tempht.Contains(tempname))
{
string countnum=tempht[tempname].ToString();
string tempvalue="";
if(tempname.Trim().Length==countnum.Trim().Length)
{
tempvalue=tempname+"1";
}
else
{
countnum=countnum.Substring(tempname.Trim().Length,countnum.Trim().Length-tempname.Trim().Length);
int currentnum=int.Parse(countnum)+1;
tempvalue=tempname+currentnum.ToString();
}
tempht.Remove(tempname);
tempht.Add(tempname,tempvalue);
}
else
{
tempht.Add(tempname,tempname);
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   973 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 21:32 · PVG 05:32 · LAX 14:32 · JFK 17:32
Developed with CodeLauncher
♥ Do have faith in what you're doing.