Time of Update: 2018-12-07
1.dynamic ExpandoObject熟悉js的朋友都知道js可以這麼寫 :var t = new Object();t.Abc = ‘something’;t.Value = 243;現在這個js動態語言的特性,我們也可以在c#中使用了,前提是將一個變數聲明為ExpandoObject類型。如下例:static void Main(string[] args){dynamic t = new ExpandoObject();t.Abc = "abc";t.Value =
Time of Update: 2018-12-07
一 CC.NET的操作流程1) 等待Trigger的喚醒;2)從Source Control System查詢上次build以後的修改列表;3)如果任何修改被發現或是Trigger觸發類型為 'force the build' : 3.1)為build產生一個label number; 3.2)按照prebuild tasks的指定順序運行prebuild tasks,如果有error則終止build; 3.3)從Source Control System獲得source
Time of Update: 2018-12-07
定義一個類,有兩個屬性 /// <summary> /// 中繼資料 /// </summary> [System.Diagnostics.DebuggerStepThrough] [Serializable] public class SandData { String key = ""; Object value = ""; /// <summary> ///
Time of Update: 2018-12-07
昨天晚上看MSDN看見的一段通過使用SetClassLong函數使視窗下面擁有一個陰影製作效果,研究代碼找資料弄了半個小時把它運用在了C#2.0上,特此一貼。由於我使用的方法是調用系統API,所以在引用聲明這塊要加上一句:using System.Runtime.InteropServices;然後再視窗類別的隨便哪個地方加上:const int CS_DROPSHADOW = 0x20000;const int GCL_STYLE = (-26);//聲明Win32
Time of Update: 2018-12-07
一、摘要 以前都是從事B/S開發,現在由於公司發展需要有個比較大的C/S項目,頁面數量有點多,而且還大多是傳統的頁面,就想批量產生介面。二、本文大綱 a、摘要。 b、本文大綱。 c、遠景。 d、產生工具。 e、總結。三、遠景 要產生的: 通過我們知道主要產生的是列表頁和編輯頁。他們的命名規範是: Frm*****List (列表頁) Frm*****Manager
Time of Update: 2018-12-07
同事在debug中遇到了這樣一個問題: 1 class basic 2 { 3 public: 4 basic() {cout << "basic ctor " << endl;} 5 virtual ~basic() {cout << " basic dtor" << endl;} 6 virtual void foo() { cout << "basic
Time of Update: 2018-12-07
FFRPCgithub 地址 https://github.com/fanchy/FFRPCFFRPC 已經陸陸續續開發了1年,6月6日這天終於完成了我比較滿意的版本,暫稱之為 V0.2,FFRPC實現了一個C++版本 的非同步進程間通訊庫。我本身是做遊戲伺服器程式的,在伺服器程式領域,系統是分布式的,各個節點需要非同步進行通訊, 我的初衷是開發一個易用、易測試的進程間socket通訊組件。實際上FFRPC 已經是一個架構。FFRPC 主要特性FFRPC 採用Epoll Edge
Time of Update: 2018-12-07
文章目錄 1. 通過全域函數建立線程2. 通過函數對象建立線程3. 通過lambda運算式建立線程4. 通過成員函數建立線程1. 互斥體類2. 鎖類3. 獲得多個互斥體對象上的鎖4. std::call_once std::once_flag5. 執行個體:1. std::condition_variable 只能等待unique_lock<mutex>的條件變數2. std::condition_variable_any
Time of Update: 2018-12-07
使用C#開發一個簡單的P2P應用 spgoal(轉貼)出處 http://www.aspcool.com作者: 劉彥青 本篇文章討論了一種設計P2P網路應用程式的簡單方法。
Time of Update: 2018-12-07
位於code.msdn.microsoft.com的一個小型Library你可以很簡單的使用它來通過gmail發送郵件或者擷取Gmail Atom Feed 。 //Send a message with one line of code RC.Gmail.GmailMessage.SendFromGmail("username", "password", "toAddress@gmail.com", "subject", "message body"); //Send a
Time of Update: 2018-12-07
我用的是一種很笨的方法,但可以協助初學者瞭解訪問XML節點的過程。 已知有一個XML檔案(bookstore.xml)如下:<?xml version="1.0" encoding="gb2312"?><bookstore> <book genre="fantasy" ISBN="2-3631-4"> <title>Oberon's Legacy</title> <author>Corets, Eva</
Time of Update: 2018-12-07
const int WM_NCHITTEST = 0x0084; const int HTLEFT = 10; const int HTRIGHT = 11; const int HTTOP = 12; const int HTTOPLEFT = 13; const int HTTOPRIGHT = 14; const int HTBOTTOM = 15; const int HTB
Time of Update: 2018-12-07
拖動無邊框表單Form至案頭任何位置首先建一個Windows應用程式將Form1的
Time of Update: 2018-12-07
//擷取系統檔案夾string folder = System.Environment.GetFolderPath(Environment.SpecialFolder.System); //繫結系統進程 private void BindProcess() { try { System.Diagnostics.Process[] ps = System.Diagnostics.Pr
Time of Update: 2018-12-07
//方法一: //須添加對System.Web的引用 using System.Web.Security; /// <summary> /// SHA1加密字串 /// </summary> /// <param name="source">源字串</param> /// <returns>加密後的字串</returns>
Time of Update: 2018-12-07
protected void Page_Load(object sender, EventArgs e) { //開啟登入頁面時擷取用戶端cookie值並寫入前台控制項中 HttpCookie cookie = Request.Cookies["name"]; if (cookie == null) { UserName.Text = "";
Time of Update: 2018-12-07
運行時的介面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 WindowsFormsApplication2{ public partial class Form1 :
Time of Update: 2018-12-07
C#中string和StringBuilder的區別 String用於表示文本,StringBuilder表示值為可變字元序列的類似字串的對象,之所以說是可變的,是因為通過追加、移除、替換或插入字元建立它以後,還可以對其進行修改。同時,在操作長度比較大的字串的時候,使用StringBuilder會更方便。 下面舉例說明其不同之處: (1)定義方式不同 string str = “Hello World”; StringBuilder sb = new
Time of Update: 2018-12-07
System.Decimal 類型是個特殊的類型,他並不直接屬於CLR IL的基本類型,而是C#語言自己定義的。(其他實值型別比如System.Int32都有對應的IL類型int32)因此可以通過Reflector查看關於操作符重載和轉換操作符的方法1. 操作符重載CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->//正:+decimal1
Time of Update: 2018-12-07
const int SECOND = 1;const int MINUTE = 60 * SECOND;const int HOUR = 60 * MINUTE;const int DAY = 24 * HOUR;const int MONTH = 30 * DAY;if (delta < 0){ return "not yet";}if (delta < 1 * MINUTE){ return ts.Seconds == 1 ? "1秒前" : ts.Seconds +