Time of Update: 2017-02-16
標籤:密鑰 調用 html 6.4 cal 微軟 user city this 上百度的API<!DOCTYPE
Time of Update: 2017-02-18
C# 將 Json 解析成 DateTable #region 將 Json 解析成 DateTable /// <summary> /// 將 Json 解析成 DateTable。 /// Json 資料格式如: /// {table:[{column1:1,column2:2,column3:3},{column1:1,column2:2,column3:3}]} ///
Time of Update: 2017-02-17
最近無意中看到了:http://www.php.cn/。但是,人笨啊,木有看懂到底是啥意思,木辦法自己寫一個試試吧,權當做個筆記例子如下:介面:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WhereTest{ /// <summary> /// 水果介面 /// </summary> public
Time of Update: 2017-02-17
英文原文:Maoni Stephens,編譯:趙玉開(@玉開Sir)CLR記憶體回收行程根據所佔空間大小劃分對象。大對象和小對象的處理方式有很大區別。比如記憶體磁碟重組 —— 在記憶體中移動大對象的成本是昂貴的,讓我們研究一下記憶體回收行程是如何處理大對象的,大對象對程式效能有哪些潛在的影響。大對象堆和記憶體回收在.Net
Time of Update: 2017-02-17
原文地址:http://www.php.cn/假設我們公司有兩種程式員:VB程式員,指的是用VB寫程式的程式員,用clsVBProgramer這個類表示;Delphi程式員指的是用Delphi寫程式的程式員,用clsDelphiProgramer這個類來表示。每個類都有一個WriteCode()方法。定義如下:class clsVBProgramer(){....WriteCode(){ //用VB語言寫代碼;}....}class
Time of Update: 2017-02-17
結論:可以驗證demo如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace IconTest{ public partial class Form2 : Form
Time of Update: 2017-02-16
explicit 和 implicit 屬於轉換運算子,如用這兩者可以讓我們自訂的類型支援相互交換explicti 表示顯式轉換,如從 A -> B 必須進行強制類型轉換(B = (B)A)implicit 表示隱式轉換,如從 B -> A 只需直接賦值(A = B)隱式轉換可以讓我們的代碼看上去更漂亮、更簡潔易懂,所以最好多使用 implicit 運算子。不過!如果對象本身在轉換時會損失一些資訊(如精度),那麼我們只能使用 explicit
Time of Update: 2017-02-16
#region 移除數組中重複資料 /// <summary> /// 移除數組中重複資料 /// </summary> /// <param name="array">需要除重的數組</param> /// <returns>不重複數組</returns> public static string[]
Time of Update: 2017-02-16
錯誤資訊如下:SqlCommand.DeriveParameters failed because the SqlCommand.CommandText property value is an invalid multipart name "SELECT * from tableA", the current limit of "4" is insufficient。錯誤原因:使用Enterprise Library進行資料庫操作時,如果直接使用sql
Time of Update: 2017-02-16
此處以表dt2中的keyIndex列(int類型)為例1、通過linq來實現int maxKeyIndex = dt2.AsEnumerable().Select(t => t.Field<int>("keyIndex")).Max();Linq文法:點擊開啟連結2、通過Compute方法來實現int ee = (int)dt2.Compute("Max(keyIndex)",
Time of Update: 2017-02-15
Windows使用一個系統:虛擬定址系統,該系統把程式可用的記憶體位址映射到硬體記憶體中的實際地址上,這些任務完全由Windows在後台管理。其實際結果是”位處理器上的每個進程都可以使用4GB的記憶體ˉ—無論電腦上實際有多少硬碟空間(在64位處理器上,這個數字會更大。這個4GB的記憶體實際上包含了程式的所有部分,包括可執行代碼、載入的所有DLL,以及程式運行時使用的所有變數的內容。這個4GB的記憶體稱為虛擬位址空間,或虛擬記憶體。4GB中的每個儲存單元都是從0開始往上排序的。要訪問儲存在記憶體的
Time of Update: 2017-02-15
1、在VS(此處目錄檔案以vs2010為例)安裝目錄下(“%Visual
Time of Update: 2017-02-15
/// <summary> /// 將對象轉換為 JSON 字串 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="input"></param> /// <returns></returns>
Time of Update: 2017-02-15
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.Serialization;using System.IO;using System.Xml;namespace Common.Utility.XMLSerialization{ /// <summary> /// DataContractSerializer /
Time of Update: 2017-02-13
1、catch throw的幾種形式及效能影響: private void Form1_Click(object sender, EventArgs e) { try { } catch { throw; } } private void Form1_Load(object sender,
Time of Update: 2017-02-13
C# 效能最佳化細節1、使用ItemArray實現對DataRow的批量賦值在對DataRow的所有欄位賦值時,使用欄位名進行逐列賦值效率較低。這時應盡量使用批量欄位賦值。可以使用ItemArray或rows.Add方法:/ ds是資料集(DataSet)對象DataTable dt = ds.Tables[0];DataRow row = dt.NewRow();row.ItemArray = new object[] { value1, value2, …, valuen };//
Time of Update: 2017-02-13
/// <summary> /// 檔案流壓縮解壓 /// </summary> public class ZipHelper { public static int BEST_COMPRESSION = 9; public static int BEST_SPEED = 1; public static int DEFAULT_COMPRESSION = -1; public static
Time of Update: 2017-02-18
1、建立測試dll及方法,用vs2010建立winform程式,具體代碼如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace reflect{ public
Time of Update: 2017-02-18
C# 擷取Excel工作薄中Sheet頁(工作表)名集合 #region 擷取Excel工作薄中Sheet頁(工作表)名集合 /// <summary> /// 擷取Excel工作薄中Sheet頁(工作表)名集合 /// </summary> /// <param
Time of Update: 2017-02-18
最近在做匯入Excel資料的時候,要檢驗資料是否重複: 1、要檢驗Excel資料本身是否有重複? 2、Excel中的資料是否與資料庫中的資料重複?一、檢驗Excel中資料是否重複的方式有: 1、將Table中的資料使用select語句來過濾(此處略,可以參考二)。 2、使用for迴圈來手動核對,代碼如下: #region 記錄Excel中的重複列 /// <summary> ///