![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#面向对象基础
种子之家
程序人生,人生程序
展开
-
继承和类类型转化
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Test { /** * 继承和类类型转化 */ public static voi原创 2012-02-23 09:36:37 · 279 阅读 · 0 评论 -
构造方法
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Robot{ class TestPeople { static void Main(string[] args) {原创 2012-02-23 09:37:53 · 225 阅读 · 0 评论 -
当属性中得get和set仅仅只是设值和取值而不需加任何限制时
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Program { static void Main(string[] args) {原创 2012-02-23 09:37:32 · 361 阅读 · 0 评论 -
异常
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Test { /** * 异常 */ public stat原创 2012-02-23 11:21:07 · 247 阅读 · 0 评论 -
使用属性时造成的死循环
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Program { static void Main(string[] args) {原创 2012-02-23 09:37:18 · 499 阅读 · 0 评论 -
当属性中的set什么语句都没的时候
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Program { static void Main(string[] args) {原创 2012-02-23 09:37:04 · 238 阅读 · 0 评论 -
属性,简化get和set
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Program { static void Main(string[] args) {原创 2012-02-23 09:36:49 · 337 阅读 · 0 评论 -
机器人
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Robot{ class TestMyRobot { static void Main(string[] args) {原创 2012-02-23 09:37:44 · 363 阅读 · 0 评论 -
普通的get和set
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Program { static void Main(string[] args) { Pers原创 2012-02-22 15:20:33 · 292 阅读 · 0 评论 -
索引器
using System;namespace ClassStudy.Zheng { class My { private string name;// 索引值为0 private string household;// 索引值为1 /** * 索引器 */ public s原创 2012-02-23 13:23:39 · 398 阅读 · 0 评论 -
程序员抛出异常
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Test { /** * 程序员抛出异常 */ public原创 2012-02-23 11:21:15 · 307 阅读 · 0 评论 -
普通常量和类常量字段
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ /** * 普通常量和类常量字段 */ class Test { public const float PI = 3.1原创 2012-02-23 11:20:50 · 508 阅读 · 0 评论 -
静态类
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ClassStudy{ class Test { public static void Main(string[] args) {原创 2012-02-23 13:23:49 · 300 阅读 · 0 评论