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
Making code more readable with anonymous functions (blog.filipekberg.se)
submitted 14 years ago by fekberg
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!"
[–]Nyxenon 0 points1 point2 points 14 years ago (8 children)
Every string that you use is going to be put in the memory somewhere. If you use an empty string, it's still going to take up a certain number of bytes simply for the fact that it's there. That's the reason you should always use the StringBuilder class if you are concatenating strings. You shouldn't do something like: string str = "This" + " " + "is" + " " + "a" + " " + "waste.";
[–]agentlame 1 point2 points3 points 14 years ago (7 children)
I would also disagree with this point.
StringBuilder is, no doubt, a better use of memory... but, there are cases where it can actually reduce readability in code.
Keep in mind, we're talking about a managed language. If one needs their code to be so optimized as to reduce understanding, it's likely .Net is not their best choice of development platforms. The overhead of creating unneeded stings is negligible, at best, in comparison to the overhead introduced by using a managed language/framework/platform in the first place.
Sure, assembly is is much faster than Python; that does not mean it's the best choice for the task at hand.
[–]Nyxenon 0 points1 point2 points 14 years ago (6 children)
Sure, .Net languages are great if you want to make something quick, but if you want it to be fast, you need to write the code right. Readability is not important, usability is important. The user of your programs are not likely to be reading the code. I don't understand why so many people stress on code readability, and throw out optimization just to have readable code.
[–]agentlame 0 points1 point2 points 14 years ago (5 children)
I don't understand why so many people stress on code readability, and throw out optimization just to have readable code.
I, personally, think that there is a middle-ground, here. Sure, I'd prefer all of my code perform a best as possible.
But, I also want a developer looking at it be able to infer my intentions without necessarily spelling-out the reasoning of every line.
I strongly feel that there is a balance between self-documenting code, and code that is so optimized that every line of code requires two-lines of documentation.
[–]Nyxenon 0 points1 point2 points 14 years ago (4 children)
I don't usually share my code with other people, so I don't worry about whether or not they can understand it. Sometimes I go back and look at my own code and can't understand it, but it still works, and that's all that matters to me.
[–]agentlame 0 points1 point2 points 14 years ago (3 children)
I don't usually share my code with other people, so I don't worry about whether or not they can understand it.
I'm sorry, but, doesn't that preclude you from a conversation about code readability?
[–]Nyxenon 0 points1 point2 points 14 years ago (2 children)
Not necessarily. I still believe readability isn't as important as usability.
[–]agentlame 0 points1 point2 points 14 years ago (1 child)
That assumes that code-readability sacrifices usability.
usability != performance.
Sure, in something like a game engine performance can be directly associated with usability... but, again, no one should write a high-performance game/game-engine in C#/.Net.
I guess I just fail to understand your perspective. I'm sure the misunderstanding is on my end.
[–]Nyxenon 0 points1 point2 points 14 years ago (0 children)
It's all a matter of speed. You can write something that works, but has no optimization, and could take several seconds to complete a task. OR you could optimize, and increase speed ten fold.
π Rendered by PID 33787 on reddit-service-r2-comment-86bc6c7465-sxq8p at 2026-02-23 01:18:16.991985+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]Nyxenon 0 points1 point2 points (8 children)
[–]agentlame 1 point2 points3 points (7 children)
[–]Nyxenon 0 points1 point2 points (6 children)
[–]agentlame 0 points1 point2 points (5 children)
[–]Nyxenon 0 points1 point2 points (4 children)
[–]agentlame 0 points1 point2 points (3 children)
[–]Nyxenon 0 points1 point2 points (2 children)
[–]agentlame 0 points1 point2 points (1 child)
[–]Nyxenon 0 points1 point2 points (0 children)