Time of Update: 2017-02-28
網路上講的C#調用Outlook介面發送郵件的例子舉不勝數,但都是將調出簡單的介面,設定收件者地址、郵件標題、本文內容等,但對於發送指定附件的說明非常少。也有實現的,卻是採用引入Outlook物件程式庫,我不想只為了如此一個小功能去引入那麼大個東東,太噁心!剛好也想給CrossFile2.0加入這個小功能,於是乎昨晚仔細研究了下Outlook的調用參數,發現還是可以用簡單的方式實現的,現貼出分享如下: Microsoft.Win32.RegistryKey rKey = Microsoft.
Time of Update: 2017-02-28
字串 這個函數也沒有什麼特別之處,就是可以截取一定長度的字串,可能小特點就是len是位元組,解決了漢字與英文位元組不一樣導致直接截取到的長度不一樣的問題, #region 字串截取函數public static string CutString(string inputString,int len){ASCIIEncoding ascii = new ASCIIEncoding();int tempLen=0;string tempString=
Time of Update: 2017-02-28
程式 簡介 MSMQ(微軟訊息佇列)是Windows作業系統中訊息應用程式的基礎,是用於建立分布式、鬆散串連的訊息通訊應用程式的開發工具。訊息佇列和電子郵件有著很多相似處,他們都包含多個屬性,用於儲存訊息,訊息類型中都指出寄件者和接收者的地址;然而他們的用處卻有著很大的區別:訊息佇列的寄件者和接收者是應用程式,而電子郵件的寄件者和接收者通常是人。
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
關鍵字: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
C# 外掛程式構架實戰 Jack H Hansen [ 2004-07-27 ] Keywords C# 外掛程式 反射(System.Reflection) 屬性(System.Attribute) 一、引言 1. 問題的引入
Time of Update: 2017-02-28
語句 (最先發表在www.kunwsoft.com) 大家肯定對switch語句並不陌生,它能夠讓程式根據控製表達式的值,從多個動作中作出選擇(從邏輯過程看,和多分支語句if-else有些相似)。在C++和java中也有這一語句,不過在C#中,這一語句則有了些變化。先看下邊一個例子: switch(letter) { case 'a':
Time of Update: 2017-02-28
縮圖 以前,在頁面上實現縮圖必須藉助第三方組件。現在,有了.NET,就可以很輕鬆地實現縮圖。下面就是實現縮圖的例子。關鍵字:C# ,ASP.NET,縮圖執行個體下載:http://www.lionsky.net/MyWebSite/DownSoft/list.aspx?id=221ToThumbnailImage.aspx<%@ Page language="c#"
Time of Update: 2017-02-28
大家知道.結構(struct)是實值型別,類(class)是參考型別,現在我們考慮一個問題,如果結構裡面有參考型別的成員,那會產生什麼樣的情況?現在我們有一個結構OneLine,先介紹一下它的特性,它對外基本可以看作是一行字串,但同時它又是由幾部分構成的,我舉個例:"ABCD",在某些應用中,我可能需要知道這個字串是由哪幾個元素構成的,是A/B/C/D還是ABC/D,而且考慮到這一行是可以添加的,所以我用了一個ArrayList來放入這些元素,以後調用的時候,就知道了,噢,是
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
//MyBuilderusing System;using System.Collections;///////////////////////product///////////////////////class HomePage{ //Fields private string pagetype; private string samplecode; private Hashtable parts=new Hashtable(); //Construcrors public
Time of Update: 2017-02-28
//MyFactoryMethodusing System;using System.Collections;//SinglePage class,which build the at last product,part element//----top classabstract class SinglePage{};//----element1class RegisterPage:SinglePage{};//----element2class LoginPage:SinglePage{};
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
//MySingletonusing System;//SingletonPage Classclass SingletonPage{ //Fields protected static SingletonPage checkoutpage; //Constructor is protected to ensure Singleton protected SingletonPage() { Console.WriteLine("if you see this line,then
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.Security.Cryptography;using System.IO;namespace 對稱式加密應用{ /// /// Form1 的摘要說明。
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
進程 自己想了另一個辦法來作先修改註冊表:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Service\\PerfProc\\Performance下的:Disable Performance Counters 的值改為0得到系統當前進程,加入到listBox中:System.Diagnostics.Process[] processOnComputer =
Time of Update: 2017-02-28
0x開頭的16進位沒有負數和小數#region change hex to doubleprivate Double HexConverToDouble(string hexString){if (hexString == ""){return 0;}string data;if (hexString.StartsWith("0x")){data = hexString.Substring(2);}else{data = hexString;}char[]