SlideShare a Scribd company logo
1 of 9
Weekly Report
2015.03.06 Kim
本周所學
 C#
Inside a C# Program
Main() and Command-Line Arguments (C# Programming Guide)
Types (C# Programming Guide)
Arrays (C# Programming Guide)
Strings (C# Programming Guide)
Statements, Expressions, and Operators (C# Programming Guide)
Classes and Structs (C# Programming Guide)
Properties (C# Programming Guide)
Interfaces (C# Programming Guide)
Indexers (C# Programming Guide)
Enumeration Types (C# Programming Guide)
Delegates (C# Programming Guide)
Generics (C# Programming Guide)
Iterators (C# and Visual Basic)
LINQ Query Expressions (C# Programming Guide)
Lambda Expressions (C# Programming Guide)
LinQPad
 LinqPad : Chapter 8
string names = { "Tom", "Dick", "Harry" }
IEnumerable<string> query = names
.Where (n => n.Contains ("a"))
.OrderBy (n => n.Length)
.Select (n => n.ToUpper());
from n in new[] { "Tom", "Dick", "Harry" }
where n.Contains ("a")
select n
Lambda Expression
 首先定義一個單參數的 delegate
 delegate int Del(int x);

以傳統 delegate 的語法來建構 delegate
 Del a = delegate(int x) { return x + 2; };

去掉 delegate 改成 Lambda 表示式
 Del a = (int x) => { return x + 2; };

由於大括號裡只有一句陳述式,而且是一個 return 的陳述式,所以可以省略大括號跟 return
 Del a = (int x) => x + 2;

在 delegate 已經有定義輸入參數的型別,所以在小括號裡的型別可以省略
 Del a = (x) => x + 2;

由於小括號裡面只有一個輸入參數,所以可以再進一步省略小括號
 Del a = x => x + 2;
法學資料檢索系統-判決書下載
 WebClient class
 Downloadfile();
 DownloadData();
 UploadValus();
 NameValueCollection
 UploadData();
Fiddler
遇到的問題
 使用webclient送出資料時,header某些部分缺少
 以迴圈執行webclient送出資料時,因為server可能
修改過header,使第一次後送出的資料server不接
受
 發生timeout時,程式就不動了
解決方法
 使用webclient.header.add() 增加所缺少的部分
 每次要使用webclient發送訊息時,new一個
instance,重新建立header
 使用try-catch對exception做處理,能讓程式繼續送
出request
下周規劃
 學習物件導向觀念
 將程式設計成之後能維護的樣子
 C# programming加強熟練
 Linq用法加強熟練
 學習html, css

More Related Content

Viewers also liked

Weekly Reflections
Weekly ReflectionsWeekly Reflections
Weekly ReflectionsLearningTech
 
Vic weekly learning_20151127
Vic weekly learning_20151127Vic weekly learning_20151127
Vic weekly learning_20151127LearningTech
 
Angular-meteor with ionic
Angular-meteor with ionicAngular-meteor with ionic
Angular-meteor with ionicLearningTech
 
Reflection &amp; activator
Reflection &amp; activatorReflection &amp; activator
Reflection &amp; activatorLearningTech
 
Elastic search custom chinese analyzer
Elastic search custom chinese analyzerElastic search custom chinese analyzer
Elastic search custom chinese analyzerLearningTech
 
Type script by Howard
Type script by HowardType script by Howard
Type script by HowardLearningTech
 
Ian .net async programming
Ian .net async programmingIan .net async programming
Ian .net async programmingLearningTech
 

Viewers also liked (13)

Weekly Reflections
Weekly ReflectionsWeekly Reflections
Weekly Reflections
 
Vic weekly learning_20151127
Vic weekly learning_20151127Vic weekly learning_20151127
Vic weekly learning_20151127
 
Angular-meteor with ionic
Angular-meteor with ionicAngular-meteor with ionic
Angular-meteor with ionic
 
Knockout js
Knockout jsKnockout js
Knockout js
 
MongoDB
MongoDBMongoDB
MongoDB
 
Reflection &amp; activator
Reflection &amp; activatorReflection &amp; activator
Reflection &amp; activator
 
Elastic search custom chinese analyzer
Elastic search custom chinese analyzerElastic search custom chinese analyzer
Elastic search custom chinese analyzer
 
Type script by Howard
Type script by HowardType script by Howard
Type script by Howard
 
Ian .net async programming
Ian .net async programmingIan .net async programming
Ian .net async programming
 
Jason yammer api
Jason yammer apiJason yammer api
Jason yammer api
 
Mocha.js
Mocha.jsMocha.js
Mocha.js
 
Polymer
PolymerPolymer
Polymer
 
Expression tree
Expression treeExpression tree
Expression tree
 

More from LearningTech

More from LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 
Asp.net MVC DI
Asp.net MVC DIAsp.net MVC DI
Asp.net MVC DI
 
R language
R languageR language
R language
 
20151120 ian cocos2d js
20151120 ian cocos2d js20151120 ian cocos2d js
20151120 ian cocos2d js
 
Vic weekly learning_20151120
Vic weekly learning_20151120Vic weekly learning_20151120
Vic weekly learning_20151120
 

Kim 2015.03.06 Weekly Report