© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
18 replies
Avis

How do I call the constructor of a parent class?

If I have something like
abstract class parent {
  public parent(string mom, string dad) {...}
}

public class child : parent {
  //how do I cal the constructor of parent?
}
abstract class parent {
  public parent(string mom, string dad) {...}
}

public class child : parent {
  //how do I cal the constructor of parent?
}

All of the tutorials i've found only talk about inheriting a class.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Explanation of the Value parameter in Class constructor
C#CC# / help
3y ago
child/parent class, how do i 'mass define' child properties?
C#CC# / help
2y ago
class constructor in c#
C#CC# / help
12mo ago
✅ How do I reference a specific private instance of a class
C#CC# / help
2y ago