© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
57 replies
proc

Beginner question: classes and constructor code?

So I've read this section a few times and it is not going in. I understand declaring regular variables, but this page in my book is talking about "public class MyNumber" then later goes on to say MyNumber numb = new MyNumber, what is the purpose of this and what is going on? Why can't they just stick to int a = 123, what is the point in all this new class and horrible syntax?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

Beginner problem with Classes
C#CC# / help
12mo ago
❔ properties/constructor question
C#CC# / help
4y ago
❔ Question about data types and classes
C#CC# / help
4y ago