预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共36页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

信息工程学院《C#程序设计》课程实验指导书C#C#C#winform1VS20052VS2005.NET24C#34forwhile4452627Windows-4TextBoxLabelButtonRadioButtonListBoxComboBoxTabContrl82SQLServer2000SQL92ADO.NetConnnectionCommandDataSetDataGridViewVS2005VS2005.NETVS.NETC#C#>WindowsVisualStudio2005MicrosoftVisualStudio2005VisualStudio2005VisualStudio.NETC#VisualStudio.NETMicrosoftVisualStudio2005MicrosoftVisualStudioC#C#VisualC#(WindowsWindows)C#VisualStudioNETC#C#Windows(Toolbox)WindowsWebC#()Form1.cs[]Form1.csC#110WindowsWindowsWindowsC#C#C#*.cs(1)(2)(3)F7C#PublicClassForm1Form1C#Windows+--+C#C#WindowsWindowsC#WebWebC#C#C#toolbox1VS.NET2C#C#C#VS.NETC#1C#C#(1)C++(2)(3)C#C++main(){//}2C#floatdoubleintlongintAHelloenumcolor{redwhitegreen}12constconstfloatPi=3.14159261namespacetest2{classProgram{staticvoidMain(string[]args){intm,n;floatf;m=12;n=3f=m+n;Console.Writeline("m={0}\n",m);Console.Writeline("f={0}\n",f);}}}21namename3usingSystem;namespacetest2{classProgram{staticvoidMain(string[]args){shortshortResult,shortVal=4;intintegerVal=67;longlongResult;floatfloatVal=10.5F;doubledoubleResult,doubleVal=99.999;stringstringResult,stringVal="17";boolboolVal=true;Console.WriteLine("VariableConversionExamples\n\n");doubleResult=floatVal*shortVal;Console.WriteLine("Implicit,->double:{0}*{1}->{2}",floatVal,shortVal,doubleResult);shortResult=(short)floatVal;Console.WriteLine("Implicit,->short:{0}->{1}",floatVal,shortResult);stringResult=Convert.ToString(boolVal)+Convert.ToString(doubleVal);Console.WriteLine("Explicit,->string:\"{0}\"+\"{1}\"->{2}",boolVal,doubleVal,stringResult);longResult=integerVal+Convert.ToInt64(stringVal);Console.WriteLine("Mixed,->long{0}+{1}->{2}",integerVal,stringVal,longResult);}}4usingSystem;classUnary{publicstaticvoidMain(){intunary=0;intpreIncrement;intpreDecrement;intpostIncrement;intpostDecrement;intpositive;intnegative;sbytebitNot;boollogNot;preIncrement=++unary;Console.WriteLine("Pre-Increment:{0}",preIncrement);preDecrement=--unary;Console.WriteLine("Pre-Decrement:{0}",preDecrement);postDecrem