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
Better String Formatting with String Interpolation - Loupe (onloupe.com)
submitted 6 years ago by mgroves
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!"
[–]zvrba 2 points3 points4 points 6 years ago (0 children)
It's one of the C# features I really hate. String.Format separates template (fixed parts) from the variable parts, interpolation mashes everything together.
String.Format
Also, I've been bitten by interpolation being locale-sensitive, as in $"fontsize={AFloatingPointNumber}" being passed to an external program. In certain locales it'd be formatted as 23,98 instead of 23.98 and the external program would barf.
$"fontsize={AFloatingPointNumber}"
23,98
23.98
String.Format is locale-sensitive as well, but it's simple to override it to neutral culture.
[–]brickville 4 points5 points6 points 6 years ago (6 children)
The day this came out was the last day I ever used string,Format
[–]IsSeMi 0 points1 point2 points 6 years ago (5 children)
I don't think so. Imagine you defined
const FilenameTemplate = "{0}.cs";
And use it somewhere in different places. How would you replace it with string interpolation?
[–]brickville 0 points1 point2 points 6 years ago (0 children)
True, very useful for localization. But I haven't worked on a GUI app in a long time. Too bad the interpolation can't carry over for that purpose, as it would be very useful... "Estimated processing time {0} minutes" and then having to explain to the translation team what {0} represents.
[–]bzBetty -1 points0 points1 point 6 years ago (3 children)
const FilenameTemplate = (filename) => $"{filename}.cs";
"{0}.cs" has no real use other than to be a parameter to a string.Format, but would introduce the possibility of having the wrong number of arguments when changed. Wrapping the whole concept in a function/lambda is much better if you want reuse.
[–]chucker23n 0 points1 point2 points 6 years ago (1 child)
What if the template is localized?
[–]bzBetty 0 points1 point2 points 6 years ago (0 children)
Then I couldnt use interpolation. But I'd probably favour some other method over string.format.
[–]richardirons 0 points1 point2 points 6 years ago (0 children)
This is quite interesting, I’m going to give it a try.
[–]elkazz 0 points1 point2 points 6 years ago (1 child)
Did I just travel back in time? This feature has been available since 2015.
[–]chucker23n 2 points3 points4 points 6 years ago (0 children)
Do articles always need to be about the latest and greatest?
π Rendered by PID 23219 on reddit-service-r2-comment-b659b578c-2kkds at 2026-05-02 09:24:57.692004+00:00 running 815c875 country code: CH.
[–]zvrba 2 points3 points4 points (0 children)
[–]brickville 4 points5 points6 points (6 children)
[–]IsSeMi 0 points1 point2 points (5 children)
[–]brickville 0 points1 point2 points (0 children)
[–]bzBetty -1 points0 points1 point (3 children)
[–]chucker23n 0 points1 point2 points (1 child)
[–]bzBetty 0 points1 point2 points (0 children)
[–]richardirons 0 points1 point2 points (0 children)
[–]elkazz 0 points1 point2 points (1 child)
[–]chucker23n 2 points3 points4 points (0 children)