Home
Sign Up
Sign In
bernard's recent timeline updates
bernard
V2EX member #130802, joined on 2015-08-05 11:27:07 +08:00
bernard
提问
技术话题
好玩
工作信息
交易信息
城市相关
bernard's recent replies
Aug 5, 2015
Replied to a topic by
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);
}
»
More replies by bernard
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2822 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms ·
UTC 06:45
·
PVG 14:45
·
LAX 23:45
·
JFK 02:45
♥ Do have faith in what you're doing.
❯