Time of Update: 2015-09-30
標籤:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Data.SqlClient;//引用namespace 訪問資料庫{ class Program { static void Main(string[] args) {
Time of Update: 2015-09-23
標籤:未在本機電腦上註冊“microsoft.ACE.oledb.12.0”提供者解決辦法去http://download.microsoft.com/download/7/0/3/703ffbcb-dc0c-4e19-b0da-1463960fdcdb/AccessDatabaseEngine.exe下載。然後安裝就行了。用access2013在D盤建一個資料庫fp.accdb。using System.Data.OleDb;using
Time of Update: 2015-09-29
標籤:#include <iostream.h>void main(){ int *p; cout << p << endl; cout << &p << endl; p = new int; *p = 5; cout << *p << endl; cout << p << endl; delete p; cout
Time of Update: 2015-09-30
標籤:前言:之前一直在搭建項目架構的代碼,有點偏離我們的主題(DDD)了,這篇我們繼續來聊聊DDD裡面另一個比較重要的知識點:領網域服務。關於領網域服務的使用,書中也介紹得比較晦澀,在此就根據博主自己的理解談談這個知識點的使用。DDD領域驅動設計初探系列文章:C#進階系列——DDD領域驅動設計初探(一):彙總C#進階系列——DDD領域驅動設計初探(二):倉儲Repository(上)C#進階系列——DDD領域驅動設計初探(三
Time of Update: 2015-09-30
標籤: public class DataCache { /// <summary> /// 擷取當前應用程式指定CacheKey的Cache值 ///
Time of Update: 2015-09-30
標籤:【來信】 我是一名研二學生,我現在學習C#,老師能不能推薦一些視頻教程。我看你的CSDN上沒有C#相關的資料啊。多謝老師。因為我之前一些在學習C++,所以才認識老師的,當時我還在CSDN上付費買了相關視頻。但是因為我換了導師,現在不得不換成學習C#了。期待老師的指導。 【回信】
Time of Update: 2015-09-29
標籤:安裝服務端 服務端:http://www.couchbase.com/download 選擇適合自己的進行下載安裝就可以了,我這裡選擇的是Win7 64。服務端安裝完後,如果成功了,那麼在瀏覽器中可以看到。如果沒有那麼需要手動進行訪問http://localhost:8091/index.html。我是在本機安裝的所以可以用localhost,可以用IP或者hostname。安裝成功之後一路next設定值。用戶端調用
Time of Update: 2015-09-29
標籤:public class MusterEnum { /// 擷取枚舉的描述資訊 /// </summary> /// <param name="e">傳入枚舉對象</param> /// <returns>得到對應描述資訊</returns> public String GetEnumDesc(Enum e) {
Time of Update: 2015-09-29
標籤:我們知道, .Net類庫裡提供了HttpWebRequest等類,方便我們編程與Web伺服器進行互動.
Time of Update: 2015-09-29
標籤: #region 匯入 /// <summary> /// 匯入 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnImport_Click(object sender, EventArgs e)
Time of Update: 2015-09-29
標籤:Assembly assm = this.GetType().Assembly;//Assembly.LoadFrom(程式集路徑); foreach (string resName in assm.GetManifestResourceNames()) { Stream stream = assm.GetManifestResourceStream(resName);
Time of Update: 2015-09-22
標籤: 有多個文字框 需要驗證為數字或者某種格式 批量驗證 逐個驗證TextBoxTextBox tb=new TextBox();tb.Validating+=Validating; void Validating(object sender, CancelEventArgs e) &
Time of Update: 2015-09-24
標籤:以前學過C#大事。但我還沒有搞懂怎麼弄。這一次,他們下進行了研究。1、定義參數類,對於參數的傳遞活動。(可以省略) public class UserEventArgs { public User user { get; set; } }2、編寫須要運行事件的類。 public class UserTask
Time of Update: 2015-09-22
標籤:private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { TextBox txt = sender as TextBox; //屏蔽非法按鍵,只能輸入小數 if ((e.KeyChar >= ‘0‘ && e.KeyChar <= ‘9‘) || e.KeyChar == ‘-‘ ||
Time of Update: 2015-09-22
標籤:Dictionary<string, string>是一個泛型他本身有集合的功能有時候可以把它看成數組他的結構是這樣的:Dictionary<[key], [value]>他的特點是存入對象是需要與[key]值一一對應的存入該泛型通過某一個一定的[key]去找到對應的值舉個例子://執行個體化對象Dictionary<int, string> dic = new Dictionary<int,
Time of Update: 2015-09-22
標籤: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
Time of Update: 2015-09-23
標籤:一,雜湊表(Hashtable)簡述 在.NET
Time of Update: 2015-09-23
標籤:blocks 這東西就是個函數指標和匿名函數。範例程式碼 //// main.m// CompletionBlock//// Created by liubing on 15/9/23.// Copyright © 2015年 QuentinLabs. All rights reserved.//#import <Foundation/Foundation.h>typedef void(^CompletionBlock)();typedef
Time of Update: 2015-09-22
標籤:#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(
Time of Update: 2015-09-22
標籤:#include <stdio.h>/*通過回呼函數的性質類比早晨被叫醒的情境注意:鬧鐘和父母的行為是被抽象的共同的行為是,到一個時間點被觸發。*//************************************************************************//* 定義回呼函數 *//************