大学C#-试题-答案题库-程序设计-.NET-Framework-visual_第1页
大学C#-试题-答案题库-程序设计-.NET-Framework-visual_第2页
大学C#-试题-答案题库-程序设计-.NET-Framework-visual_第3页
大学C#-试题-答案题库-程序设计-.NET-Framework-visual_第4页
大学C#-试题-答案题库-程序设计-.NET-Framework-visual_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

大学C#_试题_答案题库_程序设计_.NET_Framework_visualD、LoadC、IntervalB、TabIndexD、IsMdiContainer(checked)IsSelected。Override。a)publicenumvar1{Mike=100,Nike=102,Jike}b)publicenumvar1{Mike=100,Nike,Jike}c)publicenumvar1{Mike=-1,Nike,Jike}d)publicenumvar1{Mike,Nike,Jike}10.int[][]myArray3=newint[3][]{newint[3]{5,6,2},newint[5]{6,9,7,8,3},newint[2]{3,2}};myArray3[2][2]的值是(d)。/doc/5d12532298.html,框架中,服务器/doc/5d12532298.html,中,在Web窗b)<%@RegisterTagPrefix="Space2"TagName="Mike"Src="myX.ascx"%>14.在/doc/5d12532298.html,中,对于Command对象的ExecuteNonQuery()方法和ExecuteReader()方法,a)insert、update、delete等操作的Sql语句主要用ExecuteNonQuery()方法来执行;b)ExecuteNonQuery()方法返回执行Sql语句所影响的行数。c)Select操作的Sql语句只能由ExecuteReader()方法来执行;d)ExecuteReader()方法返回一个DataReder对象;15.下列/doc/5d12532298.html,语句b)SqlConnectioncon1=newSqlConnection("DataSource=localhost;IntegratedSecurity=SSPI;InitialCatalog=myDB");17.在/doc/5d12532298.html,中执行一d)IsMdiContainer;treeView1=newtreeView1.Nodes.Add("根节点")返回的是一个a)TreeNode;publicinterfaceIFileintdelFile()d)代码voiddisFile();应该编写为voiddisFile(){};/doc/5d12532298.html,中有/doc/5d12532298.html,,正确的代码为e){Reponse.Redirect("/doc/5d12532298.html,");}myButton_Click(object30.声明一个委托publicdelegateintmyCallBack(intx);则用该b)intreceive(intnum);8.(入值在0和1000之间,则适用RequiredFieldValidator和/doc/5d12532298.html,中常用的对象有6/doc/5d12532298.html,我直接用sqlhelper了有connectioncommand还有参数/doc/5d12532298.html,的身份验证方式11/doc/5d12532298.html,身份验证最12进程简单理解为单个程序吧(按ctrl+alt+del)可以看到的.它至/doc/5d12532298.html,中读写XML的/doc/5d12532298.html,页面。了.当然要/doc/5d12532298.html,支持20直接在/doc/5d12532298.html,里面(3)列举/doc/5d12532298.html,中的五3.简述private、protected、public、internal修饰符的访问权Command、Connection、DataSet、DataSetCommand、DataReader。4.解1:selecttop10*fromAwhereidnotin(selecttop30idfromA)解2:selecttop10*fromAwhereid>(selectmax(id)from(selecttop30idfromA)asA)5.列举/doc/5d12532298.html,页面之5.1.使用QueryString,如....?id=1;response.Redirect()....stringbeingconverted.privatestringstr="Class1.str";privateinti=0;staticvoidStringConvert(stringstr){str="stringbeingconverted.";staticvoidStringConvert(Class1c){c.str="stringbeingconvertestaticvoidAdd(inti){i++;staticvoidAddWithRef(refinti){i++;staticvoidMain(){inti1=10;inti2=20;stringstr="str";AddWithRef(refi2);StringConvert(str);StringConvert(c);Console.WriteLine(i1);Console.WriteLine(i2);Console.WriteLine(c.i);Console.WriteLine(str);Console.WriteLine(c.str);publicabstractclassApublicA()Console.WriteLine('A');publicvirtualvoidFun()Console.WriteLine("A.Fun()");}Console.WriteLine('B');publicnewvoidFun()Console.WriteLine("B.Fun()");}publicstaticvoidMain()516publicvirtualvoidFun1(inti){Console.WriteLine(i);publicvoidFun2(Aa)publicoverridevoidFun1(inti)publicstaticvoidMain()Aa=newA();publicclassMainClasspublicstaticvoidMain()Console.WriteLine(Foo(30));publicstaticintFoo(inti)if(i<=0)return0;elseif(i>0&&i<=2)return1;elsereturnFoo(i-1)+Foo(i-2);写出if(i>0&&i<=2)return1;得5分。(C#语言)<2>从Mouse和Master中提取抽象(5分)publicinterfaceObserverpublicinterfaceSubjectpublicclassMouse:Observerprivatestringname;publicMouse(stringname,Subjectsubj)/doc/5d12532298.html,=name;subj.AimAt(this);publicvoidResponse()Console.WriteLine(name+"attempttoescape!");}publicclassMaster:ObserverpublicMaster(Subjectsubj)subj.AimAt(this);publicvoidResponse()Console.WriteLine("Hostwaken!");publicclassCat:SubjectprivateArrayListobservers;publicCat()this.observers=newArrayList();publicvoidAimAt(Observerobs)this.observers.Add(obs);publicvoidCry()Console.WriteLine("Catcryed!");foreach(Observerobsinthis.observers)staticvoidMain(string[]args)Catcat=newCat();Mousemouse1=newMouse("mouse1",cat);Mousemouse2=newMouse("mouse2",cat);Mastermaster=newMaster(cat);//---------------------------------------------------------------------------------------------publicdelegatevoidSubEventHandler();publicabstractclassSubjectpubliceventSubEventHandlerSubEvent;protectedvoidFireAway()if(this.SubEvent!=null)publicclassCat:SubjectpublicvoidCry()Console.WriteLine("catcryed.");publicabstractclassObserverpublicObserver(Subjectsub)sub.SubEvent+=newSubEventHandler(Response);publicabstractvoidResponse();publicclassMouse:Observerprivatestringname;publicMouse(stringname,Subjectsub):base(sub)/doc/5d12532298.html,=name;publicoverridevoidResponse()Console.WriteLine(name+"attempttoescape!");publicclassMaster:ObserverpublicMaster(Subjectsub):base(sub){}publicoverridevoidResponse()Console.WriteLine("hostwaken");staticvoidMain(string[]args)Catcat=newCat();Mousemouse1=newMouse("mouse1",cat);Mousemouse2=newMouse("mouse2",cat);Mastermaster=newMaster(cat);3、malloc和new的区别装)___?4.publicstaticconstintA=1;这段代码有错误么?是什么?5.floatf=-123.567F;inti=(int)f;9.在/doc/5d12532298.html,中所有的自publicvirtualvoidF(){Console.WriteLine("A.F");publicabstractoverridevoidF();//newpublicabstractvoiddufault;//wrongenumColor:byte{string[]ss=Enum.GetNames(typeof(Color));byte[]bb=Enum.GetValues(typeof(Color));inti=5;intj=5;if(Object.ReferenceEquals(i,j))Console.Write

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论