当前位置:网站首页>C # graphic tutorial (Fourth Edition) chapter7-7.6.1 virtual and override
C # graphic tutorial (Fourth Edition) chapter7-7.6.1 virtual and override
2022-06-12 23:41:00 【Python's path to becoming a God】
using System;
namespace Chapter76_1_VirtualAndOverride
{
class MyBaseClass
{
virtual public void Print()
{
Console.WriteLine("This is the base class,With Virtual ");
}
}
class MyDerivedClass : MyBaseClass
{
override public void Print()
{
Console.WriteLine("This is the derived class.With Override ");
}
}
class Program
{
static void Main(string[] args)
{
//Console.WriteLine("Hello World!");
MyDerivedClass derived = new MyDerivedClass();
MyBaseClass mybc = (MyBaseClass)derived;
derived.Print();
mybc.Print();
}
}
}
边栏推荐
- MySQL row to column, column to row, multiple columns to one row, one row to multiple columns
- Lua date time
- 模型过拟合-解决方案(二):Dropout
- [opencv learning] perspective transformation matrix
- Find out the data that can match the keyword key in field 1 or field 2 in the database table. If you want to display the matching data in field 1 first
- [leetcode] understanding and usage of map[key]+
- Don't write about the full screen explosion, try the decorator mode, this is the elegant way!!
- 2202 resume making
- Chapter 8 - shared model JUC
- Summary of the lowest level error types in PHP
猜你喜欢

Opencv source code compilation

36 krypton's debut | "osogena" won nearly ten million angel rounds of financing. The original DLR scientists of German Aerospace Research and development system modeling and simulation CAE software PA

NCF 的Dapr应用实例的运行
![[opencv learning] perspective transformation matrix](/img/6e/7a53b257f6baafe8a3ae21cd0fe340.jpg)
[opencv learning] perspective transformation matrix

Operation of simulation test platform for G3 boiler water treatment test questions in 2022

So, what is the difference between e.target and e.currenttarget?

2022年危险化学品经营单位安全管理人员考试试题及在线模拟考试

Leetcode1601: the maximum number of building change requests that can be reached (difficult)

Develop a web office suite from scratch (5): mouse hover over text

M_8:设计消息队列存储消息数据的 MySQL 表格
随机推荐
Embedded pipeline out of the box
模型过拟合-解决方案(二):Dropout
Printf segment error (core dump): a problem caused by formatted output
Mgr and greatsql resource summary
Leetcode 2164. Sort odd and even subscripts separately (yes, once)
CV - baseline summary (development history from alexnet to senet)
Common message oriented middleware selection
Message queue directory
Novice must see! How rust beginners write gear smart contracts (1)
Zhengzhou University of light industry -- development and sharing of harmonyos pet health system
MYSQL 行转列、列转行、多列转一行、一行转多列
人脸检测:MTCNN
InfoQ 极客传媒 15 周年庆征文|简述构建微服务架构的四大挑战
How to package a colorpicker component for color selection?
Restrictions on MySQL function creation
TCP与UDP
2202-简历制作
NCF 的Dapr应用实例的运行
〖Kubernetes指南④〗Pod快速入门
Matters of parent-child class construction method in inheritance