当前位置:网站首页>C#中的继承关系
C#中的继承关系
2022-06-09 20:25:00 【charlsdm】
C#中继承关系
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
class Father
{
//public Father()
//{
//}
public Father(int i)
{
Debug.Log("Father构造");
}
}
class Son:Father
{
public Son(int i):base(i)
{
Debug.Log("Son的一个参数的构造");
}
public Son(int i,string str):this(i)
{
Debug.Log("Son的两个参数的构造");
}
}
public class Fathers : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Son myson = new Son(12, "hello");
}
// Update is called once per frame
void Update()
{
}
}
边栏推荐
- Isarray() judge whether the object is an array
- EU requires all mobile phones to use usb-c interface! Apple will be forced to abandon lightning interface
- Xcode 14 brings new improvements, and Xcode cloud is officially launched!
- Look at other people's text recognition system. It's called elegant!
- Sqlsugar help class
- Jerry's modification to improve the output frame rate of camera source video [chapter]
- C#中的里氏替换原则
- Jerry's Bluetooth distribution network [chapter]
- Is there any risk in opening an account with Ping An Securities? Is it safe?
- 压缩文件报错 tar: Exiting with failure status due to previous errors
猜你喜欢

杰理之蓝牙配网【篇】

【RK2206】4. MQTT示例

申请软件代码签名证书

Babbitt | metauniverse daily must read: Citibank reported that the metauniverse economy represents $13 trillion in income opportunities, and there are five identified early investment opportunities

2022 gdcpc Guangdong undergraduate program design competition

Unity upgrade project to URP

Safety net interview (Miscellaneous)

Xcode 14 brings new improvements, and Xcode cloud is officially launched!

2022年GDCPC广东省大学生程序设计竞赛题解

paramiko和线程池Demo(快速批量操作服务器)
随机推荐
FPGA入门实验-基于状态机实现多按键控制变速流水灯和跳变灯
Sqlsugar help class
SSL(Secure socket Layer)数字证书
卡尔曼滤波(KF)无迹卡尔曼滤波(UKF)
UNION ALL UNION FULL JOIN
将excel中的合并单元格拆分并填充数据
杰理之io_key 双按键如何使用?【篇】
NoSQL redis configuration and optimization (I blew the night breeze of Qinhuai River for you when you were not in Nanjing)
Edge browser setting network speed limit
95後大廠程序員删庫被判刑9個月
Redis knowledge points
Tar: exiting with failure status due to previous errors
上海光机所两名员工核酸阳性,园区367人将被转运
【RK2206】4. MQTT示例
Paramiko and thread pool demo (fast batch operation server)
Question bank and answers for the 2022 National latest fire facility operator (senior fire facility operator) examination
Jerry's IO_ Key how to use double keys? [chapter]
Unity upgrade project to URP
Target Segmentation -- semantic segmentation of multi category dataset by Unet
开盘大涨近72%,国产CMP设备龙头华海清科登陆科创板