手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >.net中string无重复数字的实现方法
.net中string无重复数字的实现方法
摘要:复制代码代码如下://stringstrText="1334677999";实现无重复publicstaticstringqu(string...

复制代码 代码如下:

//string strText = "1334677999";实现无重复

public static string qu(string lab)

{

string strResult = string.Empty;

for (int intIdx = 0; intIdx < lab.Length; intIdx++)

{

if (strResult.IndexOf(lab.Substring(intIdx, 1)) < 0)

{

strResult += lab.Substring(intIdx, 1);

}

}

return strResult;

}

【.net中string无重复数字的实现方法】相关文章:

asp.net为网页动态添加description描述信息的方法

axp.net ScriptManager的简单用法

ASP.NET 2.0下随机读取Access记录的实现方法

asp.net C#检查URL是否有效的方法

asp.net中包含文件的代码及使用方法

asp.net中导出excel数据的方法汇总

.Net消息队列的使用方法

ASP.NET 重定向的几种方法小结

asp.net(C#)中上传大文件的几中常见应用方法

ASP.Net中表单POST到其他页面的方法分享

精品推荐
分类导航