Re: [閒聊] 各種神人的code
最近重建程式遇到的案例
大概打了一下,如果語法上有什麼錯就...放過去吧(IDE缺乏失調症候群)
public class BaseEmployee
{
public string strEmpCD;
public string strEmpName;
public BaseEmployee(string EmpCD)
{
strEmpCD = EmpCD;
//隨便寫一下,大家看得懂在做什麼就好
strEmpName = db.cmd("select EmployeeName from Employee where EmployeeCD='" + EmpCD + "'");
}
}
public class Employee : BaseEmployee
{
public Employee(string EmpCD) : base (EmpCD)
{
strEmpCD = EmpCD;
strEmpName = db.cmd("select EmployeeName from Employee where EmployeeCD='" + EmpCD + "'");
}
}
還有一個很賭爛的,就是濫用try catch
程式碼全部用try catch包住在來自嗨自己的程式不會error
對啦,最多就是功能不能用,Debug都不知道錯在哪裡,槓,好歹接到後留個log會死嗎
--
sent from my AN/PRC-77
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.42.205.209
※ 文章網址: http://www.ptt.cc/bbs/Soft_Job/M.1410114435.A.7E9.html
※ 編輯: a47135 (114.42.205.209), 09/08/2014 02:27:53
→
09/08 02:43, , 1F
09/08 02:43, 1F
推
09/08 02:55, , 2F
09/08 02:55, 2F
推
09/08 08:41, , 3F
09/08 08:41, 3F
→
09/08 10:29, , 4F
09/08 10:29, 4F
正解
→
09/08 10:30, , 5F
09/08 10:30, 5F
※ 編輯: a47135 (114.42.205.209), 09/08/2014 15:08:04
推
09/08 22:23, , 6F
09/08 22:23, 6F
→
09/11 23:48, , 7F
09/11 23:48, 7F
討論串 (同標題文章)