C#foreach循环数组
usingSystem;namespaceArrayApplication{classMyArray{staticvoidMain(string[]args){int[]n=newint[10];/*nisanarrayof10intege
usingSystem;namespaceArrayApplication{classMyArray{staticvoidMain(string[]args){int[]n=newint[10];/*nisanarrayof10intege
usingSystem;usingSystem.Collections;namespaceCollectionsApplication{classProgram{staticvoidMain(string[]args){//creating
usingSystem;usingSystem.IO;namespaceFileIOApplication{classProgram{staticvoidMain(string[]args){FileStreamF=newFileStrea
usingSystem;namespaceCalculatorApplication{classNumberManipulator{publicintFindMax(intnum1,intnum2){/*localvariabledecla
#definePIusingSystem;namespacePreprocessorDAppl{classProgram{staticvoidMain(string[]args){#if(PI)Console.WriteLine("
usingSystem;namespaceArrayApplication{classMyArray{staticvoidMain(string[]args){/*anarraywith5rowsand2columns*/int[,]a=n
usingSystem;namespaceCalculatorApplication{classNumberManipulator{publicvoidswap(refintx,refinty){inttemp;temp=x;/*savet
usingSystem;namespaceyiibai{classStudent{privatestringcode="N.A";privatestringname="notknown";privat
usingSystem;usingSystem.Threading;namespaceDemo{classMyClass{staticvoidMain(string[]args){Threadthread=Thread.CurrentThr
usingSystem;namespaceEscapeChar{classProgram{staticvoidMain(string[]args){Console.WriteLine("HellotWorldnn");C
usingSystem;structBooks{publicstringtitle;publicstringauthor;publicstringsubject;publicintbook_id;};publicclasstestStruc
usingSystem;namespaceDemo{classMyApplication{publicstaticvoidMain(){intn=5,a=0;for(inti=1;i<=n;i++){if(n%i==0){a++;}}
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceDemo{classMyApplication{staticvoi
usingSystem;namespaceUserDefinedException{classTestTemperature{staticvoidMain(string[]args){Temperaturetemp=newTemperatu
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;classDemo{publicvoid
usingSystem;namespaceInheritanceApplication{classShape{publicvoidsetWidth(intw){width=w;}publicvoidsetHeight(inth){heigh
usingSystem;namespaceLoops{classProgram{staticvoidMain(string[]args){/*forloopexecution*/for(inta=10;a<20;a=a+1){Cons
usingSystem;namespaceErrorHandlingApplication{classDivNumbers{intresult;DivNumbers(){result=0;}publicvoiddivision(intnum
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceMyAplication{classDemo{staticvoid
usingSystem;namespaceLoops{classProgram{staticvoidMain(string[]args){/*localvariabledefinition*/inta=10;/*doloopexecutio