04 2013 档案

摘要:连接本地SQL Server数据库学习示例。1,配置web.config。1 <connectionStrings>2 <add name="We7_CMS" connectionString="Data Source=ZhangNan-PC; Initial Catalog=We7_CMS ; Integrated Security=SSPI"/>3 </connectionStrings>2,写一个测试连接的web form1 <body>2 <form id="form1" 阅读全文
posted @ 2013-04-30 09:20 张楠0412 阅读(474) 评论(0) 推荐(0)
摘要:where T : struct The type parameter <T> must have System.ValueType in its chain of inheritance; in other words, <T> must be a structure. where T : class The type parameter <T> must not have System.ValueType in its chain of inheritance (e.g., <T> must be ... 阅读全文
posted @ 2013-04-26 11:18 张楠0412 阅读(202) 评论(0) 推荐(0)
摘要:1 class Program 2 { 3 #region Person class for testing 4 public class Person 5 { 6 public int Age { get; set; } 7 public string FirstName { get; set; } 8 public string LastName { get; set; } 9 10 public Person() 1... 阅读全文
posted @ 2013-04-26 11:13 张楠0412 阅读(235) 评论(0) 推荐(0)
摘要:1 #region Generic structuer 2 public struct Point<T> 3 { 4 //Generic state date. 5 private T xPos; 6 private T yPos; 7 //Generic constructor. 8 public Point(T xVal, T yVal) 9 {10 xPos = xVal;11 yPos = yVal;12 }1... 阅读全文
posted @ 2013-04-26 10:27 张楠0412 阅读(191) 评论(0) 推荐(0)
摘要:用自定义泛型实现交换任意类型的两个变量。 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 int a = 10, b = 90; 6 Console.WriteLine("Before swap: {0}, {1}", a, b); 7 Swap<int>(ref a, ref b); 8 Console.WriteLine("After swap: {0}, {1}", a, b); 9... 阅读全文
posted @ 2013-04-26 10:01 张楠0412 阅读(199) 评论(0) 推荐(0)
摘要:一个好用的网站:http://studiostyl.es/ 阅读全文
posted @ 2013-04-15 16:20 张楠0412 阅读(155) 评论(0) 推荐(0)
摘要:计算机---->管理------>磁盘管理----->给U盘加上盘符就好了。 阅读全文
posted @ 2013-04-10 22:44 张楠0412 阅读(1917) 评论(0) 推荐(0)