mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
25 lines
No EOL
328 B
C#
25 lines
No EOL
328 B
C#
using System;
|
|
|
|
class ConsoleDrv
|
|
{
|
|
public class BaseClass
|
|
{
|
|
public virtual int MyFunc()
|
|
{
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
public class SubClass: BaseClass
|
|
{
|
|
public override int MyFunc()
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
static void Main()
|
|
{
|
|
BaseClass item = new SubClass();
|
|
int testValue = item.MyFunc();
|
|
}
|
|
} |