摘要:
select b.name as table_name,a.name as column_name,t.name type_name ,a.max_length ,a.precision,a.scale,isnull(c.value,N'') as memofrom sys.columns a join sys.tables b on a.object_id=b.object_id and b.type=N'U'join sys.types t on a.system_type_id=t.system_type_idleft join sys.extended_
阅读全文
posted @ 2014-02-28 19:00
gejianhua
阅读(465)
推荐(0)
编辑
摘要:
1.可选参数可以为方法的参数设置一个默认值,如下:classProgram{staticvoidMain(string[] args){Show();Show("cary");Console.ReadLine();}publicstaticvoidShow(stringmsg =""){Console.WriteLine("Hello {0}",msg);}}2.命名参数上面的Show方法可以象下面的方式调用:Show(msg:"cary");当你的方法有多个同一类型的可选参数(optional parameter
阅读全文
posted @ 2014-02-28 14:31
gejianhua
阅读(394)
推荐(1)
编辑
摘要:
先举个例子:代码如下:class Program{static void Main(string[] args){Console.WriteLine(Sum(1));Console.WriteLine(Sum(1, 2, 3));Console.WriteLine(Sum(1, 2, 3, 4, 5));Console.ReadKey();}private static int Sum(params int[] values){int sum = 0;foreach (int value in values)sum += value;return sum;}}实现了一个Sum方法,用于接收一组
阅读全文
posted @ 2014-02-28 12:28
gejianhua
阅读(11509)
推荐(0)
编辑