標籤:1.串連資料庫,查資料 MySqlConnection mycon = new MySqlConnection("server=localhost;user id=root;password=root123;database=bizmap;Charset=utf8;"); mycon.Open(); MySqlCommand mycmd = new MySqlCommand("select * from versioninfo where versionName=‘" +
標籤: public class CarDealer { public Action<string> NewCarInfo; //使用系統定義的泛型委派 public void NewCarComing(string car) { Console.WriteLine("CarDealer, new car {0} has come.", car);
標籤:字型的使用一般我們都是使用系統字型,這樣比較方便,直接 Font font=new Font("微軟雅黑",16f,FontStyle.Bold); 但是當我們用到一個系統沒有的字型庫時,這個方法就不好用了,因此我們可以採用動態載入字型檔的方式或者直接把字型打包到我們的程式集裡當作資源來使用;下面我們來看一下怎麼用:我封裝了一個類,大家可以直接使用,如果有不好的地方,歡迎大家指正。 using System;using
標籤: VS2015內建的C#版本為6.0,學習了一下C#6.0的新特性。 特性1:自動屬性初始化 (Initializers for auto-properties) 以前我們是這麼寫的 public string _id = "id"; public string Id { get { return _id; } set { this._id = value; }
標籤:C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23616 Accepted: 6517DescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) statement;I.e., a
標籤:DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <z1, z2, ..., zk> is a subsequence of X if there exists a