類比實現,效能還不錯,比DynamicInvoke效能好的多。中間加了一次Convert,可以實現任何對象的屬性的調用,也就是EvalEx.GetEval<Func<object, object>>方式 public static class EvalEx { public static T GetEval<T>(Type type, string propertyPath) { if (
轉自:http://community.csdn.net/Expert/topic/3151/3151832.xml?temp=.5798609if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_stuff]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure [dbo].[p_stuff]GO/*--Ntext欄位處理類比字串處理函數
using System.Xml.Serialization;using System.IO;using System.Xml;using System.Text;namespace TestProject1.XML{ public class XmlRepository<TRoot> { string _FilePath; public XmlRepository(string filePath) {
轉自:http://community.csdn.net/Expert/topic/3146/3146639.xml?temp=.5080072if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_GB2BIG]') and xtype in (N'FN', N'IF', N'TF'))drop function [dbo].[f_GB2BIG]GO--產生碼錶if exists (select *
[TestMethod] public void TestMethod1() { decimal a = 10; decimal b = 10.0m; decimal c = .0m; decimal d = 0.0m; decimal e = 0m; decimal f = 0.00001000m; var a1
public void One() { var db = new DataContext("connString"); var emp = db.GetTable<HR_Employee>().First(); HR_VoucherDetail detail = new HR_VoucherDetail(); detail.HR_Employee = emp;
轉自CSDN--查詢表結構資訊SELECT 表名=case when a.colorder=1 then d.name else '' end,表說明=case when a.colorder=1 then isnull(f.value,'') else '' end,欄位序號=a.colorder,欄位名=a.name,標識=case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end,主鍵=case
轉自:http://community.csdn.net/Expert/topic/3271/3271317.xml?temp=.3221704if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_GetPassword]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure
猜猜下面這段代碼的輸入,我預計90%以上的人給不出正確的答案 void Main(){ InitSeqBase x = new InitSeqChild();}public class InitSeqBase{ public static Nothing _SField = new Nothing("base static field initializer"); static InitSeqBase() { Console.WriteLine("base