· 用C#实现的数据库抽象工厂(二)以下3个类分别是Factory针对SqlServer专用连接、OleDb连接和Odbc连接时的具体实现:(3)SqlFactory.csusing System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;namespace DbService
{/// <summary>/// 针对SqlServer专用连接...
· Serialization:1. use attribute // "[serializable]"2. Formatter // "BinaryFormatter binaryFormatter = new BinaryFormatter();"3.[Noserialized] //example// if the data can generate based some data, then no need to serialize them.// overload the OnSerializatio...
· Delegates:// 1. nomal delegates = create before run, in main //declareclass Employee{}; class Couple{}public delegate bool Reverse(object lhs, object rhs);SetOrder(Reverse the DelegatedFunction) {}//initCouple.Reverse employeeByID = new Couple.Reverse(Employee.SecondIDLower)C...
· Queue:Enqueue()Dequeue()Peek() //only get first element, not delete it
Stack:Count()Clear()Peek()Pop()Push()CopyTo(array, offset) //copy to array
Dictionary/Hashtable:Keys //colleation of Keys, Values //colleation of valueCount()Clear()Contains() // is element in hashtableCon...
· Atributes://can add metadata in program, It store with the program//using ILDasm to check atributes//usage[CodeReviewAttribute("08/08/2005", "Allan Zhang",Comment = "That is a Attribute test")]class Employee {}//define target and atr[AttributeUsa...
· API (Application Programming Interface) is a set of commands, which interfaces the programs with the processors. The most commonly used set of external procedures are those that make up Microsoft Windows itself. The Windows API contains thousands of functions, structures, and...