- 11月 29 週四 201217:37
[C#] HTML Agility Pack 相關
- 11月 19 週一 201218:40
[C#] Convert Json to C# DataStruct by JSON.NET library
JSON.NET Sample
JSON deserialization with JSON.net
To help user to auto-convert json to c# data structure.
JSON deserialization with JSON.net
To help user to auto-convert json to c# data structure.
- 10月 11 週四 201218:05
C# 與 ReportingService2005 互動的方法
Step1:開啟一個專案(EX: console application)Step2:如下圖操作(點選 Reference),選取 Add Web Service,會跳出一個視窗。該視窗是WCF設定視窗,不過我們需要用的是舊型的Web Service,所以點選左下角的按鈕(Advance)。
- 9月 17 週一 201218:42
[C#] C# 讀取 Excel file 相關資料
Tutorial
http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm
The Simple method of use
http://csharp.net-informations.com/excel/csharp-excel-tutorial.htm
The Simple method of use
- 7月 13 週五 201200:25
[C#] ref 關鍵字利用在 object上的效果。
睡前翻書翻到的。然後上msdn發現...嘿嘿,竟然沒講。
http://msdn.microsoft.com/zh-tw/library/14akc2c7(v=vs.100).aspx
這有點難用程式碼寫出來,不過我覺得應該用個...一些圖表示,有空在畫好了。
// 預備畫圖...
http://msdn.microsoft.com/zh-tw/library/14akc2c7(v=vs.100).aspx
這有點難用程式碼寫出來,不過我覺得應該用個...一些圖表示,有空在畫好了。
// 預備畫圖...
- 6月 27 週三 201200:21
[C#] C# 4.0:Named and Optional Arguments
http://msdn.microsoft.com/en-us/library/dd264739.aspx
msdn的說明。
先講 Optional Arguments(可選參數)應用在Method(方法)上,這功能就是幫你預設好參數(Arguments)值,當有輸入值的時候就聽遵循輸入值的話 ; 當沒有輸入值的時候就直接把預測值塞入。 這東西可以用Overload的寫法實作,但是程式碼將會壟長很多..。
msdn的說明。
先講 Optional Arguments(可選參數)應用在Method(方法)上,這功能就是幫你預設好參數(Arguments)值,當有輸入值的時候就聽遵循輸入值的話 ; 當沒有輸入值的時候就直接把預測值塞入。 這東西可以用Overload的寫法實作,但是程式碼將會壟長很多..。
- 6月 19 週二 201220:00
[C#] .Net 4.0 新功能 ZIP!!!
當初是為了處理兩個Array / List 放在同一個For loop內一起使用,但是不想要改動到既有的程式碼而上網查的。(簡單來說本來功能都寫好了,但是我臨時發現忘記記錄一筆資料,但我List 的 Data struct都設計好了不想再更動他,所以想想有沒有比較偷懶的方法)
.Net 4.0推出這個東西其實還蠻不錯的.....雖然當下看會覺得這個Func真的是一點屁用都沒有,因為一般人不會那麼蠢把都要放到For loop中的資料拆成兩個Array。
不過站在這種奇妙的案例下這Func就蠻有用的...= =++
http://stackoverflow.com/questions/1955766/iterate-two-lists-or-arrays-with-one-foreach-statment-in-c-sharp
.Net 4.0推出這個東西其實還蠻不錯的.....雖然當下看會覺得這個Func真的是一點屁用都沒有,因為一般人不會那麼蠢把都要放到For loop中的資料拆成兩個Array。
不過站在這種奇妙的案例下這Func就蠻有用的...= =++
http://stackoverflow.com/questions/1955766/iterate-two-lists-or-arrays-with-one-foreach-statment-in-c-sharp
- 6月 15 週五 201215:10
[C#] 比較兩個 List<int> 是否相同的方法
回家在整理。
http://stackoverflow.com/questions/5766573/in-c-what-is-the-best-way-to-compare-2-integer-lists-array
額外新增,List用法介紹。
http://stackoverflow.com/questions/5766573/in-c-what-is-the-best-way-to-compare-2-integer-lists-array
額外新增,List用法介紹。
- 6月 14 週四 201218:29
[C#] 實現Singleton的方法比較
回家在看~
http://big5.webasp.net/article/15/14889.htm
http://msdn.microsoft.com/en-us/library/ff650316.aspx
http://big5.webasp.net/article/15/14889.htm
http://msdn.microsoft.com/en-us/library/ff650316.aspx
- 6月 12 週二 201215:57
[C#] "Where" of LINQ (three methods)
// Main function
class MainFunc
{
static void Main(string[] args)
{
string[] animals = new string[] { "Koala", "Spider", "Elephant" };
wherepractice prac = new wherepractice();
// get animals of StartName is "S"
prac.detailWhere(animals);
// get amimals of StartName is "E"
prac.lambdaWhere(animals);
// as above result, but different implement.
prac.delegateImpleWhere(animals);
Console.ReadLine();
return;
}
}
class MainFunc
{
static void Main(string[] args)
{
string[] animals = new string[] { "Koala", "Spider", "Elephant" };
wherepractice prac = new wherepractice();
// get animals of StartName is "S"
prac.detailWhere(animals);
// get amimals of StartName is "E"
prac.lambdaWhere(animals);
// as above result, but different implement.
prac.delegateImpleWhere(animals);
Console.ReadLine();
return;
}
}
