Time of Update: 2018-12-07
[Effective C# 4.0 譯] 第三章 用C#表達你的設計翻譯:羅朝輝(http://www.cnblogs.com/kesalin/) 題記:網路中已不乏[Effective C#]的中文翻譯版,中文版本也已出版,但是內容比較老,不是最新版(C#
Time of Update: 2018-12-07
1.what is Event in C# simplely speaking,Event in C# is that as one instance does one behaviour, it will receive the message and then react with the message.2.Event Happening&Re-acting Mechanism3.how to declare a Event i.first declare a
Time of Update: 2018-12-07
從編程所處層次而言,WIN32為最底層,其次是MFC.然後是ATL,最後是CLR.1. WIN32常規就是不用MFC,使用API函數編的程式;可調用Win32 WinAPI; 1) Win32 Application 2) Win32 Console Application 3) Win32 Dynamic-Link Library 4) Win32 Static Library 2. MFC(Microsoft Foundation
Time of Update: 2018-12-07
方法一:在c#裡執行cmd命令,net start/stop mssqlserver方法二:// 使用 Windows 服務控制器來啟動或停止服務using System;using System.Windows.Forms;using System.ServiceProcess;class Test : Form{Test(){Button btn1 = new Button();btn1.Parent = this;btn1.Text = "啟動 SQL Server";btn1.Tag =
Time of Update: 2018-12-07
轉自:http://www.weste.net/html/200408/20040825QBI101746.html使用 C# 和 C++.NET 開發的 .NET 應用程式執行個體列表----------------------------------概述本文檔列出了 Crystal Decisions 支援人員網站上所有可用的,使用 C# 和 C++.NET 開發的 .NET 應用程式執行個體列表。本文檔還給出了每一個程式的描述和下載連結。隨著新程式加入我們的支援網站,本文檔將不斷更新。--
Time of Update: 2018-12-07
private void DownLoadFile(){ try { WebClient client = new WebClient(); if (!Directory.Exists(Application.StartupPath + @""update")) { Directory.CreateDirectory(Application.StartupPath + @""update"); }
Time of Update: 2018-12-07
1 private SymmetricAlgorithm mobjCryptoService; 2 private string Key; 3 ///// <summary> 4 ///// 對稱式加密類的建構函式 5 ///// </summary> 6 public SymmetricMethod() { 7 mobjCryptoService = new RijndaelManaged(); 8
Time of Update: 2018-12-07
設計模式C#描述——Factory 方法模式Factory 方法模式是類的建立模式,又叫做虛擬構造子模式或多態性原廠模式。它的用意是定義一個建立產品對象的工廠介面,將實際建立工作延遲到子類中。簡單原廠模式的缺點:由於工廠類集中了所有產品建立邏輯的,如果不能正常工作的話會對系統造成很大的影響。如果增加新產品必須修改工廠角色的源碼。Factory 方法模式的優點:在Factory
Time of Update: 2018-12-07
使用反射動態調用類成員,需要Type類的一個方法:InvokeMember。對該方法的聲明如下(摘抄於MSDN):public object InvokeMember( string name, BindingFlags invokeAttr, Binder binder, object target, object[] args);參數name String,它包含要調用的建構函式、方法、屬性或欄位成員的名稱。 - 或 - Null 字元串 (""),表示調用預設成員。
Time of Update: 2018-12-07
C#學習筆記-隔離儲存,序列化羅朝輝(http://www.cnblogs.com/kesalin/)《C#與.NET進階程式設計》讀書筆記 隔離儲存1,由於.NET能載入來自不同位置來源的程式集,信任問題就很重要,我們要確保不同來源的程式集不會讀取系統的敏感性資料,進行不安全的操作。在.NET
Time of Update: 2018-12-07
圖形處理在VC下顯示JPEG、GIF格式映像的一種簡便方法一、 引言 JPEG映像壓縮標準隨然是一種有損映像壓縮標準,但由於人眼視覺的不敏感,經壓縮後的畫質基本沒有發生變化,很快便以較高的壓縮率得到了廣泛的認可。GIF格式雖然僅支援256色但它對於顏色較少的映像有著很高的壓縮率,甚至超過JPEG標準,也得到了廣泛的認同。但作為眾多程式員的一個重要的開發工具--Microsoft Visual C++
Time of Update: 2018-12-07
1. the similar feature 相似性 grammar: public const int x=100; public readonly int x; const variable and readonly variable can not be modified once they are initialized in run-time. However,the main differences between them is the time
Time of Update: 2018-12-07
1.compile File.cs and generate File.exe編譯file.cs 產生file.exe csc file.cs2.comple File.cs and generate File.dll編譯file.cs產生file.dll csc /target:library filel.cs3.only complie file.cs without generating any output只產生file.cs不產生其他檔案 csc /nooutput
Time of Update: 2018-12-07
類間關係在類圖中,除了需要描述單獨的類的名稱、屬性和操作外,我們還需要描述類之間的聯絡,因為沒有類是單獨存在的,它們通常需要和別的類協作,創造比單獨工作更大的語義。在UML類圖中,關係用類框之間的連線來表示,連線上和連線端頭處的不同修飾符表示不同的關係。類之間的關係有繼承(泛化)、關聯、彙總和組合。(1)繼承:指的是一個類(稱為子類)繼承另外的一個類(稱為基類)的功能,並增加它自己的新功能的能力,繼承是類與類之間最常見的關係。類圖中繼承的表示方法是從子類拉出一條閉合的、單鍵頭(或三角形)的實線指
Time of Update: 2018-12-07
關鍵字:Managed 程式碼managed code, 不安全的程式碼unsafe code, 固定託管指標fixed, 在stack上分配空間stackallocManagedd Code和UnManaged Code 運行在公用語言運行庫 (CLR) 的控制之下的代碼稱為“Managed 程式碼”,運行在 CLR 之外的代碼稱為“Unmanaged 程式碼”。COM、COM+、C++ 組件、ActiveX 組件和 Win32 API 都是Unmanaged
Time of Update: 2018-12-07
此項改造工作是為了將原本在叢集hpc01節點上的程式,搬到一台Windows機器上運行。覺得VC太龐大,遂決定採用DEV-C++ 作為開發工具。自己是首次使用它。一 從hpc01轉移到Windows單機平台時採用了DEV-C++,所遇到的問題使用 DEV-C++ 時,需要在 Project options -> Parameters->linker中添加1. c:/Program Files/DEV-CPP/Lib/libws2-32.a(支援程式中的多線程功能)2. {MySQL
Time of Update: 2018-12-07
那麼擴充方法起什麼作用呢?很多時候我們想為已經存在的類擴充某些功能,而又沒有必要去繼承該類,甚至有時候這個類根本就不允許繼承,如String類,這時候就可以使用擴充方法來為其擴充功能。 下面舉例說明: 一、我們建立一個類庫如下: Code:using System; using System.Collections.Generic; using System.Linq; using System.Text;
Time of Update: 2018-12-07
C++ 與 C#資料結構類型對應關係表 網上文章1API與C#資料結構類型對應關係表 API與C#的資料類型對應關係表
Time of Update: 2018-12-07
C#
Time of Update: 2018-12-07
http://stackoverflow.com/questions/6349125/are-c-sharp-delegates-thread-safe Regarding the invocation of the delegate the answer is yes.Invoking a delegate is thread-safe because delegates are immutable. However, you must make sure that a delegate