© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•11mo ago•
24 replies
Faker

✅ What is a primary constructor in C#

Hello guys, was just reading a bit about primary constructors. My question is, primary constructors is just a "fancy" way to write less code instead of declaring a whole constructor? Or are there any reasons why we would use primary constructors?
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

✅ what is a primary constructor? is it any similar to parameterless constructor?
C#CC# / help
16mo ago
Primary Constructor
C#CC# / help
5mo ago
class constructor in c#
C#CC# / help
12mo ago
Default parameter values in primary constructor
C#CC# / help
3y ago