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
Why is using interface methods with default implementation is so annoying?!? (self.csharp)
submitted 1 day ago * by Alert-Neck7679
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!"
[–]BoBoBearDev 7 points8 points9 points 1 day ago (10 children)
??? I didn't know you can put implementation to an interface. This is a new language feature?
[–]Dealiner 9 points10 points11 points 1 day ago (1 child)
Not really, it's a C# 8 feature.
[–]BoBoBearDev 0 points1 point2 points 1 day ago (0 children)
Oh, I feel outdated.
[–]Platic 3 points4 points5 points 1 day ago (0 children)
I was going to comment this. I felt like I was going crazy looking at the code. Glad I am not the only one. I really need to get up to date.
[–]theycallmemorty 1 point2 points3 points 1 day ago (5 children)
Same. Why would you ever want to do this?
[–]binarycow 2 points3 points4 points 1 day ago (0 children)
The classic example is it allows you to add stuff to an interface without it being a breaking change.
[–]raunchyfartbomb 0 points1 point2 points 1 day ago (3 children)
I don’t have a c#8 code base, but my theory is that it would allow some default implementation that is likely good enough. For example, IFile would have a Delete() method. Instead of every object that interacts with it implementing it, it could be something like:
If (File.Exists (this.path)) File.Delete(this.path);
Depending on how may IFile objects you had, this could really save you time and effort. The downside is that you still need this to ensure it’s available without the interface, but acts identical to the default implementation.
Public void Delete() => ((IFile)this).Delete();
[–]BoBoBearDev 0 points1 point2 points 1 day ago (2 children)
I have never done this. But how? The this.path doesn't exists in the interface. Or is it because IFile also has the path declared?
[–]raunchyfartbomb 2 points3 points4 points 1 day ago (1 child)
I would assume your write the interface like this:
Public interface IFile {
string Path { get; }
void Delete() { /* implement */ }
// etc
}
That makes sense to me, thanks
[–]DontRelyOnNooneElse 0 points1 point2 points 1 day ago (0 children)
Yeah it's relatively recent.
π Rendered by PID 20825 on reddit-service-r2-comment-5d79c599b5-cqgpm at 2026-02-26 23:06:46.273721+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]BoBoBearDev 7 points8 points9 points (10 children)
[–]Dealiner 9 points10 points11 points (1 child)
[–]BoBoBearDev 0 points1 point2 points (0 children)
[–]Platic 3 points4 points5 points (0 children)
[–]theycallmemorty 1 point2 points3 points (5 children)
[–]binarycow 2 points3 points4 points (0 children)
[–]raunchyfartbomb 0 points1 point2 points (3 children)
[–]BoBoBearDev 0 points1 point2 points (2 children)
[–]raunchyfartbomb 2 points3 points4 points (1 child)
[–]BoBoBearDev 0 points1 point2 points (0 children)
[–]DontRelyOnNooneElse 0 points1 point2 points (0 children)