.net中string無重復數字的實現方法_.Net教程

      編輯Tag賺U幣

      推薦:.net 頁面指定區域打印的方法
      .net 頁面指定區域打印的方法,需要的朋友可以參考一下

      復制代碼 代碼如下:www.wf0088.com

      //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;
      }

      分享:VB.NET 中刪除DataGridView中所選行的小例子
      之前為這個刪除所選行還費了點腦筋,因為每Removeat一行之后,后面的行會自動縮進,而且會自動選中下一行,很麻煩,后來發現很簡單:

      來源:模板無憂//所屬分類:.Net教程/更新時間:2013-04-22
      相關.Net教程