摘要: Lazy Evaluation behaves in a surprising way in LINQ, look at an example. First, consider the following Boolean function that as a side-effect outputs the doctor's initials:public static bool dump(Doctor d){ System.Console.WriteLine(d.Initials); return true;}Now use dump in a simple query that wi 阅读全文
posted @ 2011-08-05 09:54 lochker 阅读(404) 评论(0) 推荐(0) 编辑
摘要: varType "var" is commonly used in C#, but do not confuse var with the concept of a VB variant (it's not), nor with the concept of var in dynamic languages like JavaScript (where var really means object).In these languages the variable's type can change, and so type checking is perf 阅读全文
posted @ 2011-08-05 07:55 lochker 阅读(287) 评论(0) 推荐(0) 编辑