ImageVerifierCode 换一换
格式:DOCX , 页数:15 ,大小:17.40KB ,
资源ID:1140950      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-1140950.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(c#综合练习附答案Word文档格式.docx)为本站会员(b****1)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

c#综合练习附答案Word文档格式.docx

1、B、按地址传递 C、按引用传递 D、什么也不传递 5、类中两个以上的同名方法,只要不同,编译器就知道调用哪个方法()。A、参数类型 B、参数类型或参数个数 C、参数与顺序个数 D、返回类型 6、加载窗体时触发的事件是( )。A、Click B、Load C、GotFoucs D、DoubleClick 7、改变窗体的标题,需修改的窗体属性是( )。A、Text B、Name C、Title D、Index 8、控件组合了Textbox控件和Listbox控件的功能() A、Label B、ComboBox C、StatusBar D、PictureBox 9.Textbox控件的Passwor

2、dChar属性的作用是()。A、该属性是Boolean类型,表示是否使用*号隐藏输入信息。B、该属性是String类型,表示输入的隐藏信息的实际内容 C、该属性是Char类型,表示用哪个字符的隐藏输入的信息() D、该属性在C#中未使用 9、Timer的事件在每个时间间隔内被重复激发。()。B、Tick C、ServerTick D、Server Click 10、用户点击消息框按钮时返回值()。A、DialogValue B、DialogBox C、DialogResult D、DialogBox 二、填空题 1、C#数组类型是一种引用类型,所有的数组都是从System命名空间的类继承而来

3、的引用对象。答案:object 2、一般将类的构造方法声明为访问权限。如果声明为private,就不能创建该类的对象。public或公有 3、类中声明的属性往往具有get()和两个函数。set() 4、对于方法,参数传递分为值传递和两种。引用传递 5、传入某个属性的SET方法的隐含参数的名称是。答:value 6、C#提供一个默认的无参构造函数,当我实现了另外一个有一个参数的构造函数时,还想保留这个无参数的构造函数。这样我应该写构造函数。两个 7.装箱是把值类型转换到类型。引用类型 8.拆箱是引用类型返回到类型。值类型 9.C#的值类型包括、和三种。整数类型、浮点类型以及布尔类型 三、简答题

4、1.如何区别重载方法?不同的参数类型,不同的参数个数,不同的参数顺序 2.C#用多种修饰符来表达类的不同性质。根据其保护级C#的类有五种不同的限制修饰符,请写出并指出它们之间的区别是什么?public 可以被任意存取 protected只可以被本类和其继承子类存取 internal只可以被本组合体(Assembly)内所有的类存取,组合体是C#语言中类被组合后的逻辑单位和物理单位,其编译后的文件扩展名往往是“.DLL”或“.EXE”。protected internal唯一的一种组合限制修饰符,它只可以被本组合体内所有的类和这些类的继承子类所存取。private只可以被本类所存取。3. 编写一

5、个类,利用方法重载完成二个整数、三个整数之和,在主函数中分别调用并输出和。class Program public static int Add(int x, int y) return x + y;public int Add(int x, int y, int z) return x + y + z;static void Main(string args) Program program = new Program(); /实例化类对象 int x = 3;int y = 5;int z = 7;/根据传入的参数类型及参数个数的不同调用不同的Add重载方法 Console.WriteLi

6、ne(x + + + y + = + Program.Add(x, y); + z + + program.Add(x, y, z);Console.ReadLine();4、设计一个成绩类,此类能够记录学生姓名、学号、成绩和科目,并且定义学生学号属性class student public string name;public int no;public string sex;public float score;public string subject;public string NO /创建学号属性 get return no;set no = value;四、程序阅读题 1、usin

7、g System;class Arraysort static void Main( ) int nums=new int10,8,36,12,24;foreach(int j in nums) Console.Write(“00”, j);Console.WriteLine();for(int j=nums.Length-1;j=0;j-) Console.Write (“00”, numsj);10 8 36 12 24 24 12 36 8 10 2、class Fruit public string color;public string shape;public Fruit(stri

8、ng c, string s) color = c;shape = s;class Test public static void Main() Fruit Orange = new Fruit(orange, round);Console.WriteLine(0,1, Orange.color, Orange.shape);orange, round 3、using System;class Point public int x,y;public Point(int x ,int y) this.x=x;this.y=y;static void Main() Point p=new Poin

9、t(5,6);x=0,p.x);y=0,p.y);x=5 y=6 4、class Decon1 public Decon1( ) Console.WriteLine(“调用构造函数Decon1”);Decon1( ) Console.WriteLine(“调用析构函数Decon1”);class Decon2 public Decon2( ) Console.WriteLine(“调用构造函数Decon2”);Decon2( ) Console.WriteLine(“调用析构函数Decon2”); Decon1 dec1=new Decon1( );Decon2 dec2=new Decon2

10、( );调用构造函数Decon1 调用构造函数Decon2 5、using System;public void myMeth( ) int j;for(j=1;j=5) j=j*2;Console.WriteLine(j );return;else j=j*3; Test lei=new Test( );16 7、using System;public void Swap(int x,int y) int k;k=x;x=y;y=k;int a=8, b=68;a=0, y=1, a, b);Test sw=new Test();sw.Swap(a, b);a=8,b=68 8、using

11、System;class TestoverLoad public void print(int i) 输出的整数=0,i);public void print(string s) 输出的字符串=0, s);public void print(double d) 输出的双精度数=0,d);class test public static void Main( ) TestoverLoad app=new TestoverLoad( );app.print(6);app.print(理解方法重载了吗?app.print(3.14);输出的整数=6 输出的字符串=理解方法重载了吗?输出的双精度数=3

12、.14 9、class A public int count;public A() count = -1;public A(int n) count = n;A a = new A();count=0, a.count);A b = new A(5);, b.count);count=-1 count=5 10、有以下程序,计算结果 Console.Write(输入一整数String s = Console.ReadLine();int num = int.Parse(s);if (num+ 5) Console.WriteLine(num);Console.WriteLine(- -num);Console.Read();运行时,从键盘输入5,则输出结果是:

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2