Skip to content

"Base" Keyword

Mario Gutierrez edited this page Jan 7, 2017 · 2 revisions

Just like Java's super, C# has the base keyword to reference the parent class.

public MyClass(int a, string b) : base(a)
{
  this.b = b;
}

You of course can use base to access members of the base class as well.

Clone this wiki locally