Time of Update: 2015-09-11
標籤:解決方案是唯一的,在一個程式當中有且只有一個。最上面那個就是解決方案。再解決方案下面就有很多的工程,比如現在預設的那個ConsoleApplication1就是一個工程。我們可以在解決方案中添加很多的工程。、圖上的控制台程式,表單程式,類庫等等都是工程,可以添加在解決方案中,實際上項目就是工程。在工程就有很多的源檔案(.CS副檔名的)
Time of Update: 2015-09-11
標籤:這兒所說的並不是對檔案進行讀寫,只是針對於擷取檔案和目錄等。主要分為對磁碟機,目錄和檔案三大類。對磁碟機需要用到DriveInfo類來實現對目錄需要用到DirectoryInfo類來實現對檔案需要用到FileInfo類來實現。其中 FileSystemInfo類既可以訪問檔案,也可以訪問目錄。具體看下面的代碼。首先是訪問磁碟機: //示範檔案操作 /// <summary> /// 定義一個操作類 /// </summary>
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace out_ref{ class Program { static void Main(string[] args) { //把123替換為一二三 string str =
Time of Update: 2015-09-10
標籤: /// <summary> /// 替換第一個合格字串 /// </summary> /// <param name="value"></param> /// <param name="oldValue">所要替換掉的值</param> /// <param
Time of Update: 2015-09-10
標籤:SQLDMO.Restore oRestore = new SQLDMO.RestoreClass(); SQLDMO.SQLServer oSQLServer = new SQLDMO.SQLServerClass(); 在VS2010中編譯上述代碼,提示“無法嵌入互操作類型“SQLDMO.BackupClass”。請改用適用的介面。”
Time of Update: 2015-09-10
標籤:建立控制台項目 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace Hello_World 8 { 9 class Program10 {11 12 static void Main(string[] args)13
Time of Update: 2015-09-10
標籤:轉自:http://blog.csdn.net/pan_junbiao/article/details/9155497 C#使用GET、POST請求擷取結果,這裡以一個簡單的使用者登陸為例。1、 使用GET請求擷取結果1.1 建立LoginHandler.aspx處理頁面protected void Page_Load(object sender, EventArgs e){ string result = ""; string userName = Request.
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;/*泛型棧*/namespace ExGeneric{ class MyStack<T> { const int MaxStack = 10; T[]
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;namespace CSharp棧{ class Program { static void Main(string[] args) { Stack<string> stack = new Stack<string>(); stack.Push("元素1");
Time of Update: 2015-09-10
標籤:C#中的類和類成員都是預設為非靜態,只有加上"static"關鍵字的才是非靜態兩者用起來其實都非常簡單.雖然調用方式不同,但其最終的機制都是一樣的.主要區別在於非靜態依靠對象來調用,靜態利用類來調用,即靜態屬於整個類,並不屬於某一執行個體.靜態內部只能調用已經確定的變數,即靜態內部只能調用靜態和已經執行個體化之後的成員.非靜態就所有都可以調用具體看下面的代碼/// <summary> /// 非靜態類 在這兒我們把它所有成員都定以為非靜態 ///
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;using System.Linq;namespace Queue測試{ class Program { static void Main(string[] args) { Queue<string> strList = new Queue<string>(); ///向隊列加入元素
Time of Update: 2015-09-10
標籤:在當下,二維碼的使用越來越加普遍,下面就用winform來實現二維碼的產生:首先需要下載一個ThoughtWorks.QRCode.dll,然後在項目添加引用ThoughtWorks.QRCode.dllusing ThoughtWorks.QRCode.Codec;建立一個winfrom程式,使用pictureBox來展示將要產生的二維碼產生二維碼方法public Bitmap CodeImage(string str) {
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;/* * 1、枚舉是實值型別 * 2、成員只有一種類型:命名的整數值常量 * 3、成員聲明列表以逗號隔開 * 4、後一個成員比前一個增1 * 5、不能有重複的名稱,但可以有重複的值 */namespace exEnum{ enum
Time of Update: 2015-09-10
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;/* * 結構是自訂的資料類型,與類類似,包含資料成員和函數成員 * 1、結構是實值型別 * 2、結構是隱式密封的不可以派生 * 3、結構中欄位初始化是不允許的 */namespace ExStruct{ struct Simple
Time of Update: 2015-09-10
標籤:Eval( " ")和Bind( " ") 這兩種一個單向綁定,一個雙向繫結,bind是雙向繫結,但需資料來源支援ASP.NET 2.0改善了模板中的資料繫結操作,把v1.x中的資料繫結文法DataBinder.Eval(Container.DataItem, fieldname)簡化為Eval(fieldname)。Eval方法與DataBinder.Eval一樣可以接受一個可選的格式化字串參數。縮 短的Eval文法與DataBinder.
Time of Update: 2015-09-11
標籤:A String object is called immutable (read-only), because its value cannot be modified after it has been created. Methods that appear to modify a String object actually return a new String object that contains the
Time of Update: 2015-09-11
標籤: 1 package fengke.hashcode; 2 /** 3 * 4 * @author 鋒客 5 *學習筆記: 6 *1.hashcode並不是記憶體位址,只是和記憶體位址有關; 7 *2.==判斷的是記憶體位址 8 *3.equals一般被String等參考型別重寫,並不是比較記憶體位址,而是實際代表內容的差異; 9 *3.當調用某個類時,先載入static的內容;10 *11 */12 13 public class
Time of Update: 2015-09-11
標籤:New Year is coming, and Jaehyun decided to read many books during 2015, unlike this year. He has n books numbered by integers from 1 to n. The weight of the i-th (1 ≤ i ≤ n) book is wi.As
Time of Update: 2015-09-11
標籤:因為所有整數都能被唯一分解,p1^a1*p2^a2*...*pi^ai,而一次詢問的數可以分解為p1^a1k*p2^a2k*...*pi^aik,這次詢問會把所有a1>=a1k && a2 >= a2k &&...a3 >=
Time of Update: 2015-09-10
標籤: 1.[[email protected] ~]# rpm -qi glibcName : glibc