摘要:
闲来无事... 使用Adventureworks数据库测试了linq2sql,发现其对表达式列支持不好,测试代码如下: AdventureWorksDataContext db = new AdventureWorksDataContext(); Customer c = new Customer(); ... 阅读全文
摘要:
很多时候,很多应用都会使用到某些计算公式,而这些计算公式一段时间之后可能会调整。目前,一般处理的办法有硬编码、数据库表配置以及脚本。自ironpython发布之后,.net动态脚本的威力日增,以至于有DLR的诞生... 以下是有关代码:(使用ironpython自带的示例文件first.py) using System; using Syst... 阅读全文
摘要:
面试的时候碰到上面的题目,实际上我没把它做好,而且我对算法不怎么学习. 晚上洗菜的时候突然一想, "最快的算法......", 觉得当时没把题目把握好,并且一下子来了灵感, 于是把它coding下来: using System;using System.Collections.Generic;namespace SortDemo{ class Program ... 阅读全文
摘要:
碰巧看到吕震宇 兄的文章 C#设计模式(1) ,中提到 先有鸡还是先有蛋 的代码 using System;class Client{ public static void Main () { Base b = new Base(); Derived d = new Derived(); b.d = d; Console.WriteL... 阅读全文