当前位置:网站首页>类 对象 属性 方法 类的成员
类 对象 属性 方法 类的成员
2022-08-09 09:20:00 【qq_35774189】
类:具体同种属性的对象 狗
对象:类的实例化 泰迪
属性:静态 具体某个对象的特征 棕色的毛
方法:每个对象有他们自己的行为或方法 会叫、会跑
类的成员:属性和方法 构成一个对象的主要部分
//Dog类
Class Dog{
//狗的属性eyes
private string eyes=" "; //建立私有成员
public string Eyes
{
set{eyes=value;} //对eyes进行赋值
get{return eyes;} //对eyes进行取值
}
//眼睛的方法Look()
public void Look()
{
//Look 方法
}
}
Person wang=new Person(); //实例化一个对象
wang.Eyes="big"; //王眼睛的属性
wang.look(); //王的方法
边栏推荐
- 使用图新地球无法加载谷歌地球的完美解决方法(附软件下载)
- Anti App so层对抗分析
- Venture DAO Industry Research Report: Macro and Classic Case Analysis, Model Summary, Future Suggestions
- AES/ECB/PKCS5Padding加解密
- lateral view explode的另一种实现方式
- 约瑟夫问题的学习心得
- 软件测试分析流程及输出项包括哪些内容?
- MySQL Leak Detection and Filling (2) Sorting and Retrieval, Filtering Data, Fuzzy Query, Regular Expression
- seata处理分布式事务
- 测试计划包括哪些内容?目的和意义是什么?
猜你喜欢
性能测试包括哪些方面?分类及测试方法有哪些?
中国打造国产“谷歌地球”清晰度吓人
TestNG使用教程详解
JMeter初探五-配置元件与参数化
本体开发日记04-努力理解protege的某个方面
"The camera can't be used" + win8.1 + DELL + external camera + USB drive-free solution
软件测试面试中,面试官问你一些比较“刁难”的问题你会怎么回答
数理逻辑MOOC+知识点总结(未完无待续)
lateral view explode的另一种实现方式
China to create a domestic "Google Earth" clarity scary
随机推荐
上帝视角看高清村庄卫星地图,附下载高清卫星地图最新方法
【环境搭建】tensorrt
The era of Google Maps is over, how to view high-definition satellite image maps?
MySQL Checking and Filling Leaks (5) Unfamiliar Knowledge Points
性能测试报告包括哪些内容?模板范文哪里找?看这里
谷歌地图时代结束,怎么看高清卫星影像地图?
Ovie map computer terminal and mobile terminal can not be used, is there any alternative map tool
本体开发日记01-Jena配置环境变量
关于链表的几道大厂面试题
接口测试主要测试哪方面?需要哪些技能?要怎么学习?
本体开发日记04-努力理解protege的某个方面
Domestic with Google earth software, see the download 19th level high-resolution satellite images so easy!
What are the basic concepts of performance testing?What knowledge do you need to master to perform performance testing?
China to create a domestic "Google Earth" clarity scary
Do you know the principles of test cases and how to write defect reports?
性能测试的基本概念是什么?做好性能测试需要掌握哪些知识?
JMeter参数化4种实现方式
Flutter的基础知识之Dart语法
这12个GIS软件一个比一个好用
Understanding of PID control motor output as motor PWM duty cycle input