© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
22 replies
SolwayFirth

✅ variables declared with/without the “new” keyword.

What difference does using the word
new
new
make in the code? even in terms of memory allocations n stuff.

also in this code how many
TrialObjects
TrialObjects
objects were created?
TrialObjects testObj1 = new TrialObjects("some string argument1");
TrialObjects testObj2 = new TrialObjects("some string argument2");
TrialObjects testObj3 = testObj1;
TrialObjects testObj1 = new TrialObjects("some string argument1");
TrialObjects testObj2 = new TrialObjects("some string argument2");
TrialObjects testObj3 = testObj1;
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

Similar Threads

✅ struggling with the keyword "Return"
C#CC# / help
2mo ago
Confusing code with keyword ref
C#CC# / help
2y ago
✅ Static keyword
C#CC# / help
11mo ago
var keyword
C#CC# / help
2y ago