摘要:
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 阅读全文
摘要:
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 阅读全文