当使用MVVM时,相信你和我一样经常有这样的需求: 在ViewModel里定义了一个Enum,它必然是对应UI上的一个ListControl作为不同选项。 有一种做法是使用Converter,将Enum的Values取出用作Binding。但是当Converter数量增长时,你会想是能少一个Conv Read More
绑定(Binding)是WPF提供的一个非常方便的特性,它可以方便的实现一个WPF的MVVM结构。 既可以实现数据驱动UI变化,也可以做到End-user在UI上的修改实现的反映到数据上。 但是有一点必须注意的是:WPF的数据基本上都是使用的引用类型,引用类型的特性就是在传递过程中,数据本体是没有变 Read More
扩展其实真的很简单 msdn是这样规定扩展方法的:“扩展方法被定义为静态方法,但它们是通过实例方法语法进行调用的。 它们的第一个参数指定该方法作用于哪个类型,并且该参数以 this 修饰符为前缀。” 扩展方法的关键不在于定义所在的class的名字,关键在于扩展方法的第一个参数,以及所有class和扩展方法是否为static。 扩展方法的第一个参数指定这个扩展方法作用在的class。 比... Read More
quiesce tablespace quiesce tablespaces for table share; Monitor Switches details on http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.mon.doc/doc/c0005719.html ... Read More
You must write a failing unit test before you write production code. You must stop writing that unit test as soon as it fails; and not compiling is failing. You must stop writing production c... Read More
我有一段如下代码,定义一个接口iInterface,cBase实现iInterface,cChild继承cBase,UML为 预期是想要cBase.F()的执行逻辑,同时需要cChild的返回值,所以FF预期的输出 1: namespace ConsoleApplication1 2: { 3: class Program 4: ... Read More