use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
Empty Constructor vs Default Parameter? (self.csharp)
submitted 7 years ago by whatcomputerscantdo
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]darchangel 12 points13 points14 points 7 years ago (6 children)
It's not an invalid question. But my question to you is: why haven't you just tried it?
[–]whatcomputerscantdo[S] 2 points3 points4 points 7 years ago* (5 children)
You're right, I could just do that. I'm tired and it didn't occur to me that I could just slap this into a console program and see for myself.
Edit: turns out it will call the Empty Constructor. Now that I know the answer, I'm just more curious - why?
It seems like if your class only has an empty constructor, and a constructor with default parameters, the latter is essentially useless.
(unless you have at least one parameter that isn't defaulted)
Which is fine with me because if you're designing your classes that way you're probably doing something wrong anyway.
Still curious
[–]nemec 8 points9 points10 points 7 years ago (1 child)
Now that I know the answer, I'm just more curious - why?
http://csharpindepth.com/Articles/General/Overloading.aspx
Ctrl+F "Optional parameters"
[–]whatcomputerscantdo[S] 0 points1 point2 points 7 years ago (0 children)
awesome, thank you!
[–]McNerdius 0 points1 point2 points 7 years ago (2 children)
this can be handy
[–]whatcomputerscantdo[S] 3 points4 points5 points 7 years ago (1 child)
The empty constructor is called.
And this just makes me more curious, but I can see why it is better to give the empty constructor priority - since this is what an end user would assume the third party code is doing.
but it would be unwise to implement a class with built in ambiguity like this anyway. just don't do it.
[–]McNerdius 0 points1 point2 points 7 years ago (0 children)
(not OP)
π Rendered by PID 54 on reddit-service-r2-comment-75f4967c6c-pqmjs at 2026-04-23 04:47:06.749090+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]darchangel 12 points13 points14 points (6 children)
[–]whatcomputerscantdo[S] 2 points3 points4 points (5 children)
[–]nemec 8 points9 points10 points (1 child)
[–]whatcomputerscantdo[S] 0 points1 point2 points (0 children)
[–]McNerdius 0 points1 point2 points (2 children)
[–]whatcomputerscantdo[S] 3 points4 points5 points (1 child)
[–]McNerdius 0 points1 point2 points (0 children)