Re: [問題] Arraylist 插入值的問題
看板C_Sharp (C#)作者DearKurt ("小朋友"會自己找出路...)時間17年前 (2009/03/02 00:27)推噓0(0推 0噓 0→)留言0則, 0人參與討論串2/2 (看更多)
: for (int j = 0; j<tempList.Count; j++)
: {
: if (tempList[j].Equals(pkid)) judge = 1;
: //除以一千
: }
: if (judge==0) myValue = myValue / 1000;
: 下面是我的sql語法的code
: public ArrayList Select_account_map(string account_us)
: {
: return base.GetArrayList("Select account_pkid from account_map
: where account_us = '" + account_us + "' ");
: }
有沒有GetArrayList的部份內容?
第一種可能GetArrayList沒寫好 return都是空的ArrayList 根本不會進到for loop裡面
第二種可能GetArrayList塞進去ArrayList的type不是Int 但你的pkid是Int
所以永遠不會相等
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.104.82.48
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
C_Sharp 近期熱門文章
PTT數位生活區 即時熱門文章