自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 资源 (3)
  • 收藏
  • 关注

转载 base关键字

1.base其实最大的使用地方在面相对性开发的多态性上,base可以完成创建派生类实例时调用其基类构造函数或者调用基类上已被其他方法重写的方法。例如:2.关于base调用基类构造函数public classA{publicA(){Console.WriteLine("Build A");}}public class B:A{

2016-08-30 10:56:38 409

原创 捕获异常及自定义异常类

捕获异常: try - catch 收尾工作: try - catch - throw 抛出异常: throw 语句自定义异常类

2016-08-30 10:20:53 663

原创 装箱和拆箱

主要内容: int n = 16; object obj = n;//装箱 Console.WriteLine (obj); int i =(int )obj;//拆箱 Console.WriteLine(i); //注意:装箱拆箱过程损失了程序的性能,尽量少用。

2016-08-29 15:08:03 344

原创 基类向下转换

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 基类___派生类__向下转换{    class Program    {        static void Main(string[] args)        {

2016-08-27 14:18:20 435

原创 派生类有参构造函数的编程

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 派生类构造函数{    class Program    {        static void Main(string[] args)        {     

2016-08-26 16:49:11 586

原创 索引器访问离散字段(输出有点小问题 暂时还没找到错误。) “homephone”引号里面多打了个 空格键! 导致字符串不匹配

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 索引器访问离散字段{    class Program    {        static void Main(string[] args)        {

2016-08-25 18:08:38 282 2

原创 索引器的使用

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 索引器{    class Program    {        static void Main(string[] args)        {         

2016-08-25 16:44:06 193

原创 数组的传递

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 数组在方法中的传递{    class Program    {        static void Main(string[] args)        {

2016-08-25 10:14:58 384

原创 this 关键字的用法

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace this关键字{    class Time    {        private int hour;        private int minute;     

2016-08-25 09:29:58 280

Form窗体(缩放)及其控件的自适应

WinForm窗体及其控件自适应各种屏幕分辨率

2016-11-27

c#获取cpu 主板 硬盘ID

用c#编写的获取计算机cpu序列号,主板ID,硬盘序列号,网卡地址的小工具(附代码)

2016-10-25

自己编写的记事本小项目

自己编写的记事本小项目

2016-09-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除