Skip to content

Instantly share code, notes, and snippets.

@chitoku-k
Last active August 29, 2015 14:01
Show Gist options
  • Save chitoku-k/110c7e95ca6d912e5acb to your computer and use it in GitHub Desktop.
Save chitoku-k/110c7e95ca6d912e5acb to your computer and use it in GitHub Desktop.
Base class test
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