C#泛型
usingSystem;usingSystem.Collections.Generic;namespaceGenericApplication{publicclassMyGenericArray<T>{privateT[]arr
usingSystem;usingSystem.Collections.Generic;namespaceGenericApplication{publicclassMyGenericArray<T>{privateT[]arr
usingSystem;namespaceOperatorOvlApplication{classBox{privatedoublelength;//Lengthofaboxprivatedoublebreadth;//Breadthofa
usingSystem;delegatevoidNumberChanger(intn);namespaceDelegateAppl{classTestDelegate{staticintnum=10;publicstaticvoidAddN
#definePIusingSystem;namespacePreprocessorDAppl{classProgram{staticvoidMain(string[]args){#if(PI)Console.WriteLine("
usingSystem;usingSystem.Collections.Generic;classProgram{staticvoidMain(){LinkedList<string>myList=newLinkedList&l
usingSystem;namespaceArrayApplication{classMyArray{staticvoidMain(string[]args){int[]n=newint[10];/*nisanarrayof10intege
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceDemo{classMyApplication{staticvoidMain(string[]arg
namespaceRectangleApplication{classRectangle{//membervariablespublicdoublelength;publicdoublewidth;publicdoubleGetArea()
usingSystem;usingSystem.Collections;namespaceCollectionsApplication{classProgram{staticvoidMain(string[]args){Queueq=new
usingSystem;publicclassMyClass{[Obsolete("Don'tuseOldMethod,useNewMethodinstead",true)]staticvoidOldMethod
#defineDEBUG#defineVC_V10usingSystem;publicclassTestClass{publicstaticvoidMain(){#if(DEBUG&&!VC_V10)Console.Writ
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceDemo{classMyApplication{staticvoi
usingSystem;namespaceVariableDefinition{classProgram{staticvoidMain(string[]args){shorta;intb;doublec;/*actualinitializa
usingSystem;namespaceOperatorsAppl{classProgram{staticvoidMain(string[]args){inta=21;intb=10;intc;c=a+b;Console.WriteLin
usingSystem;namespaceCalculatorApplication{classNumberManipulator{publicvoidgetValue(outintx){inttemp=5;x=temp;}staticvo
usingSystem;usingfirst_space;usingfirst_space.second_space;namespacefirst_space{classabc{publicvoidfunc(){Console.WriteL
usingSystem;namespaceCalculatorApplication{classNumberManipulator{publicintFindMax(intnum1,intnum2){/*localvariabledecla
usingSystem;usingSystem.Text.RegularExpressions;namespaceRegExApplication{classProgram{staticvoidMain(string[]args){stri
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceDemo{classMyApplication{staticvoi
usingSystem;usingSystem.IO;namespaceDelegateAppl{classPrintString{staticFileStreamfs;staticStreamWritersw;//delegatedecl