C# base

base is the default constructor of all classes. If no custom constructor is provided, the base method will be called when an instance is created.

In fact, all constructors are inherited from base constructor.

class human
{
public int age;
public human() : base()
{ ... }
}



endmemo.com © 2024  | Terms of Use | Privacy | Home