摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Dynamic;namespace ConsoleApplication1{ class Program { private static T1 Add<T1,T2>(T1 a,T2 b) { dynamic m = a; dynamic n = b; return (dynamic)(m + n); } static void Main(string[] args) { //string[] 阅读全文
摘要:
/字符串格式化,自动化属性赋值using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { //string[] names = { "ganquanfu", "ligang", "zhongshi" }; //var res = names.Where(name => 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace ConPra{ class Program { //主线程结束之后,所有的子线程都结束 public static void Main(string[] Args) { Thread t1; Thread t2; t1 = new Thread(new ThreadStart(PrintfAllDatasThrea 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;namespace ConPra{ class Program { public static void Main(string[] Args) { string name = "asfafasfasf fasf"; char n = name[0]; Console.WriteLine("获取的字符为:" + n);//输出a strin 阅读全文