Time of Update: 2017-02-28
控制項|顯示
Time of Update: 2017-02-28
object MapObjects2.2 在C#中的應用(基本地圖功能)關鍵字:MapObjects 2.2 C# 僅僅實現了地圖的放大、縮小、漫遊、全圖、距離、面積等功能。 /* * 楊雨田 blue_bat@126.com * 2004年7月27日 */using System;using System.Drawing;using System.Collections;using System.ComponentModel;using
Time of Update: 2017-02-28
函數|數組 執行個體:/// <summary>/// 使用者資訊結構/// </summary>public struct TUSER{ public string LoginName; public string LoginPass; public string TrueName; public string EMail; public int Level;}/// <summary>//
Time of Update: 2017-02-28
關鍵字:ArrayList ,IComparer,介面,C#我看見網上有人問IComparer介面的使用,於是寫了個小例子,和大家一塊分享。有不足之處,望不吝指正1、建一個結構僱員的結構 private struct Eployee{ public string name; public int age; public string sex; }2、建立3個"僱員" Eployee ep1=new Eployee();
Time of Update: 2017-02-28
上一篇就結構的效能、局限性以及它和類的比較作了簡單的描述,這篇我將接著介紹在使用結構時應該注意和把握的原則: 通過上篇的介紹,我們可以很自然的意識到結構在效率上的優越性(相對於類),這主要歸因於它們在底層的實值型別結構。不過,它們的對於大容量資料和複雜度高的演算法進行處理時所表現出來的局限性,使得它的適用範圍大受限制。那我們在什麼情況下使用結構才能不受指責和嘲笑呢?
Time of Update: 2017-02-28
在論壇上經常看到C#裡有沒有預設參數的問題,在C# Team的blog裡看到Eric Gunnerson的一篇文章Why doesn't C# support default parameters? 看完後想起原來用Reflector反編譯看Int32的ToString函數的時候,三個重載的函數代碼分別是:public override string ToString(){ return this.ToString(null, null);}public string
Time of Update: 2017-02-28
treeview|攻略 using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using com.prm.client.tools;using System.Data.OracleClient;//using
Time of Update: 2017-02-28
treeview|攻略 using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using com.prm.client.tools;using System.Data.OracleClient;//using com.prm.client.common;namespace
Time of Update: 2017-02-28
//MyAbstractFactoryusing System;///////////////Basic Products//////////////// //AbstractProductsabstract class FontsStyle{ public string stylestring; };abstract class TablesStyle{ public string stylestring;};//RealProductsclass
Time of Update: 2017-02-28
//MyPrototypeusing System;using System.Collections;//abstract PageStylePrototype Class 'Prototypeabstract class PageStylePrototype{ //Fields protected string stylestring; //Properties public string StyleString { get{return stylestring;}
Time of Update: 2017-02-28
express|visual 近日從MS的網站下載了Visual C# .NET Express Beta 1來玩玩,發現了一些期待已久的功能:1、支援模版類,很爽的: List<int> intList = new List<int>(); intList.Add(0); intList.Add(1);2、支援一些新的自動排版功能: List<int>
Time of Update: 2017-02-28
動態 (C#)利用反射動態調用類成員 使用反射動態調用類成員,需要Type類的一個方法:InvokeMember。對該方法的聲明如下(摘抄於MSDN):public object InvokeMember( string name, BindingFlags invokeAttr, Binder binder, object target, object[] args);參數name
Time of Update: 2017-02-28
1.微軟支援 在你學習VS.NET的過程中,有疑問首先要向MicroSoft求助。如果你不懂得利用MicroSoft提供的龐大的學習資源,我要告訴你,你很不幸,你捨近求遠了。 (1)首先,你要安裝MSDN,他比所有VS.NET書籍詳細。我為了裝MSDN,可是犧犧了我的98和XP雙啟動,改成WindowsXP單系統。裝了MSDN後,你要學習Regex,VS.NET
Time of Update: 2017-02-28
編程|動態|載入|控制項 關鍵詞:動態載入,控制項,外掛程式
Time of Update: 2017-02-28
函數|區別 從vc入門編程的,相信大家都很熟悉PreTranslateMessage和WindowProc兩個函數,前者是預先處理windows發給控制項的訊息,後者是處理剩餘的控制項訊息。對於PreTranslateMessage函數,一般來說,我們是這樣處理控制項訊息的:BOOL test::PreTranslateMessage(MSG* pMsg) {if(pMsg->hwnd==GetSafeHwnd()){if(pMsg->
Time of Update: 2017-02-28
文字框 今天閑著無聊,試著用C#寫查看密碼框的程式(不僅限於密碼框,應該是任何有文本的控制項都可以)代碼見下面.用C++實現起來超簡單的這麼個東東..用C#複雜得很,我又不想用unsafe,我總覺得用unsafe的話,幹嘛不乾脆用C++算了.int Length=300;IntPtr THandle=APIs.GetLocalWindow();//取得當前滑鼠所在位置的控制項控制代碼int
Time of Update: 2017-02-28
C#中奇妙的操作符重載
Time of Update: 2017-02-28
//迷宮類相關using System;using System.Drawing;using System.Drawing.Drawing2D;using System.Collections;namespace MazeDemo{ /// <summary> /// 迷宮類 /// </summary> public class CMaze { bool[,] mg; //地圖格子 Stack stack; //堆棧 Point in_p; //進入點
Time of Update: 2017-02-28
//表單,調用...using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Threading;namespace MazeDemo{ /// <summary> /// Form1 的摘要說明。 /// </summary> public
Time of Update: 2017-02-28
現在關於oo的編程思想已經越來越被大家接受,但是大家對一些基礎化的東西不是很熟悉,比如基類和子類的調用順序。在這裡我以c#為例給大家講解一下對於一個下面一段代碼 public class baseClass { public string a="baseClass" ; public baseClass() { a="初始化baseClass"; } } public class