Last active
August 29, 2015 14:01
-
-
Save chitoku-k/110c7e95ca6d912e5acb to your computer and use it in GitHub Desktop.
Base class test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
new A(); | |
new B(); | |
} | |
} | |
class A | |
{ | |
public A() | |
{ | |
System.Console.WriteLine(this.GetType().BaseType.Name); | |
} | |
} | |
class B : object | |
{ | |
public B() | |
{ | |
System.Console.WriteLine(this.GetType().BaseType.Name); | |
} | |
} | |
/* 出力 | |
* Object | |
* Object | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment