繼承|區別 using System;using System.Collections;public class Nevermore60Customer:Customer{ public override string GetFunnyString() { return "Nevermore60.Nevenmore!"; }----------------------------------------------------
編程|網路 談起socket編程,大家也許會想起QQ和IE,沒錯。還有許多網路工具如P2P、NetMeeting等在應用程式層實現的應用程式,也是用socket來實現的。Socket是一個網路編程介面,實現於網路應用程式層,Windows Socket包括了一套系統組件,充分利用了Microsoft Windows 訊息驅動的特點。Socket規範1.1版是在1993年1月發行的,並廣泛用於此後出現的Windows9x作業系統中。Socket規範2
函數 //本周是本年第幾周private int DatePart(System.DateTime dt) { int weeknow = Convert.ToInt32(dt.DayOfWeek);//今天星期幾 int daydiff = (-1) * (weeknow+1);//今日與上周末的天數差 int days =
結構:1.定義----public struct CWSData { public string strTitle;//標題 public string strQYCode;//企業代碼 public CWSDataTM[] cDetailItems;//指向細目 } public struct CWSDataTM { public string strSXH;//順序號 public string strBXH;// 報銷號 public string
觸發器|建立 第一步:在Visual Studio 2005中編寫代碼using System;using System.Data;using System.Data.Sql;using System.Data.SqlServer;using System.Data.SqlTypes;public partial class Triggers{ // Enter existing table or view for the target
程式|演算法 當我要寫一個MD5演算法的程式時,發現中英文的語言描述都有一些不確切的地方,某些個細節講得不清楚,或者說很費解。最後不得不拿出C語言的來源程式來調試,這對於理解演算法是很不利的。於是就總結了一下我摸索到的一些要點。1.來曆MD5的全稱是message-digest algorithm 5(資訊-摘要演算法,在90年代初由mit laboratory for computer science和rsa data security
window using System;using System.Runtime.InteropServices;namespace GetWindowsVersion{ [ StructLayout( LayoutKind.Sequential )] public class OSVersionInfo { public int OSVersionInfoSize; public int MajorVersion;