Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
bernard
›
全部回复第 1 页 / 共 1 页
回复总数
1
2015 年 8 月 5 日
回复了
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);
}
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2677 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms ·
UTC 10:58
·
PVG 18:58
·
LAX 03:58
·
JFK 06:58
♥ Do have faith in what you're doing.
❯