<?php class Person{ public $name="xiaoming"; function say(){ echo "i am ".$this->name; } function run($addr){ echo "i am running at ".$addr; } } $per=new Person; //$per->say(); //利用反射实现对象调用方法 //$md=new ReflectionMeth…
基本思想,将MsSqlDbUtility和MySqlDbUtility设计成单例模式,通过App.config或Web.config进行默认的数据库设置,然后通过DbUtilityFactory获取DbUtility. 1.接口: using System; using System.Collections.Generic; using System.Data; using System.Linq.Expressions; using RA.DataAccess.MsSqlDbUtility;…