A simple write-written example

xiaoxiao2021-03-06  60

Using system;

A summary description of Namespace consoleApplication1 {///

/// Class1. /// class class1 {/// /// The primary entry point of the application. /// [static "static void main (string [] args) {gen [] objgen = new gen [2]; objgen [0] = new zhi (); objgen [1] = new new newzhi () Foreach (Gen g in objgen) {system.console.writeline (G.PrintHello ());}}} Abstract Class Gen {Public Virtual String Printhello () {Return "It's an abstract method";}} Class Zhi: Gen {Public Override String Printhello () {Return "it's an override method";}} Class Newzhi: Gen {Public New String Printhello () {Return "It's a new method";}}}

转载请注明原文地址:https://www.9cbs.com/read-112323.html

New Post(0)