標籤:最近項目用到的讀取Excel 為DataTable 相容2003、2007、2010。記錄一下,以後會用到引用 NPOI.dll 和 EPPlus.dll 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Data; 6 using OfficeOpenXml; 7 using System.IO; 8
標籤:Debug 模式下運行程式的時候,Output 視窗出來個錯誤“A first chance exception of type ‘System.ArgumentException‘ occurred in System.Data.dll”。 但是並沒有直接throw錯誤。無法知道具體在哪一步發生了這個錯誤。如果想知道具體的內容,需要enable 這個debugIf you do want to know, in Visual Studio -> Debug
標籤:http://blogs.msdn.com/b/ericlippert/archive/2007/10/16/covariance-and-contravariance-in-c-part-one.aspxI have been wanting for a long time to do a series of articles about covariance and contravariance (which I will shorten to
標籤:http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspxC# implements variance in two ways. Today, the broken way.Ever since C# 1.0, arrays where the element type is a reference
標籤:// Copyright 2010 ESRI// // All rights reserved under the copyright laws of the United States// and applicable international laws, treaties, and conventions.// // You may freely redistribute and use this sample code, with or// without
標籤:#include <stdio.h>#define A 0int funcA(int a, int b){ return a + b;}/*把指標作為函數的傳回值*/int * funcB(int a, int b){ static int c = A; c = a + b; return &c;}/*通過函數進行記憶體的申請*//** 參數:要申請的記憶體大小* 傳回值:申請好的記憶體的首地址 * 這是一種不好的方式*/int * funcC(
標籤:#include <stdio.h>/*聲明一個函數,函數名稱的本質就是一個函數指標*/int funcA(int a, int b){ int c = a + b; printf("a = %d, b = %d \n", a, b); return c;}/*聲明一個函數指標*//*注意,函數指標的類型要與其指向的函數原型相吻合*/int (*p_funcA)(int, int);int(*p_funcB)(int a);int main(int argc,