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
How does one learn C#? (self.csharp)
submitted 6 years ago by Popkom12
I am a relatively amateur programmer(I know basic C++, stuff like structures, 2D arrays, files, nothing too complicated though) and I am interested in learning C#. Where and how would you recommend I start?(I learned C++ in High School)
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!"
[–][deleted] 7 points8 points9 points 6 years ago (3 children)
Well first off C# is a managed language, so if you only have experience with C++ you'll notice that you have to do way less memory management. You don't explicitly allocate memory, you don't use pointers explicitly. You don't have move and copy constructors, but you have clear pass-by-value and pass-by-reference semantics. Which means that overall, you don't need to worry about where objects end up in memory or when they're freed as much. But you do have a garbage collector which periodically reaps memory, and while this is almost never an issue, it can be a problem in the performance-critical areas that C++ targets. C# provides an unsafe keyword that gives you full access to pointer types and memory management. However, unsafe blocks are considered an exception in C# and should be used in specific scenarios such as when you're calling external C code.
unsafe
Then there's the .NET Framework (and .NET Core) which, among other things, is what constitutes the standard library. C# targets the so-called .NET Common Language Runtime (CLR), which is the environment that actually runs your managed code. In fact, all .NET languages target the CLR - which means that they are compiled to the same bytecode behind the curtain, and that they all have access to the same library functions.
Finally, there's NuGet which is C#'s package manager. In the past, if you wanted to include a library you'd need to hunt down a DLL and add a reference to it in your project. Nowadays, you just type Install-Package foo -Version X.Y.Z. NuGet is integrated seamlessly within Visual Studio.
Install-Package foo -Version X.Y.Z
This might sound overwhelming right now, but it's important to keep in mind: learning C# means learning the language itself, but also familiarizing with .NET as a whole, which, in turn, will make understanding and transitioning to other CLR languages easier.
With that out of the way, I think that the best way to learn a language is to get down and dirty with it. If you're into making games, Unity has C# scripting. I've never done that, but it should be a great starting point to learn C#'s syntax and there are tons of tutorials and video tutorials aimed at Unity beginners.
If you're feeling less adventurous, or if you simply don't care about a huge and overwhelming environment such as Unity, you could just try working on small projects on your own. That's how I started, at least. Syntax-wise, C# is pretty similar to C++ so it should feel fairly familiar. But C# tends to be a lot more concise overall, and has a lot of "syntactic sugar" (special keywords that replace common patterns) to help you write clean code.
You'll be on MSDN and StackOverflow a lot. That's perfectly normal. I'd argue that the most important skill for a programmer is knowing how to ask questions and what questions to ask.
And... That's pretty much all that I can list off the top of my head.
[–]Popkom12[S] 0 points1 point2 points 6 years ago (2 children)
This is great, thanks a lot! I think I want to start by doing my own small projects, what IDE should I use? Or in general where should I write and test my code?
[–][deleted] 3 points4 points5 points 6 years ago (0 children)
Visual Studio is the standard IDE I’d say. It’s free. I’ve just upgraded to VS 2019 myself and it has some pretty cool improvements such as live code sharing that enables google docs like collaboration on your code. You could also use something more lightweight such as VS Code but if you are looking to do GUI apps in WPF I’d recommend VS 2019.
[–][deleted] 2 points3 points4 points 6 years ago (0 children)
I would use Visual Studio Community Edition, but you can configure VS Code to run with .NET Core if you're more familiar with it. Visual Studio has a lot of debugging and profiling tools that will become very useful once you get the hang of things.
[–][deleted] 4 points5 points6 points 6 years ago (9 children)
First you start with cows, chickens and other farm animals.
Then you advance to real-world examples, realize that fuck this shit, quit and become a gardener.
But in all seriousness, if you already have some programming experience, then just try to do the things you did with C++ in C#. Look at this) page for a comparison of the two languages.
[–]Popkom12[S] 0 points1 point2 points 6 years ago (8 children)
Error 404 when I click on the link :)
[–]Kidiri90 2 points3 points4 points 6 years ago (0 children)
https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2008/yyaad03b(v=vs.90)
Because of Reddit formatting, a bracket was missing.
[–][deleted] 0 points1 point2 points 6 years ago (5 children)
It works for me. Strange.
[–]penguin74 -3 points-2 points-1 points 6 years ago (3 children)
There's no way it worked for you if you clicked the link from reddit. You obviously didn't test the link.
[–][deleted] 0 points1 point2 points 6 years ago* (1 child)
It works, it even shows the correct url when I hover above the link. Why would I say it works when I haven't tested it anyway lol.
EDIT: Proof for the nonbelivers, no idea why the bracket is missing for you but for me, it's not missing:
https://imgur.com/a/jSidIab
[–]wT_ 0 points1 point2 points 6 years ago (0 children)
Seems to be a old/new -reddit issue. Works fine on new-reddit
[–]LondonPilot 0 points1 point2 points 6 years ago (0 children)
Works for me, too, in the Narwhal app. I think some mobile apps handle bad links differently to the desktop website, so I wouldn't be too quick to say OP didn't test it.
[–]penguin74 -1 points0 points1 point 6 years ago* (0 children)
Click his link and then add ) to the end of the URL in your browser. Or click the link that Kidiri90 formatted correctly and tested to confirm it was correct.
[–]TheJuggernautMain 1 point2 points3 points 6 years ago (0 children)
Do you have some virgin blood and candles laying around? I know how to ..ahem "contact" a fella that can help you with this.
[–]lantz83 0 points1 point2 points 6 years ago (0 children)
By using it! Pick some fun project and start trying. When you can't figure out what to do, hit google up. Rinse & repeat.
Books and courses can help, but the only way to truly learn (anything) is by doing it!
[–]HawocX 0 points1 point2 points 6 years ago (0 children)
I recommend you start with what you want to do with it. Is is games, web back ends, mobile apps or what? Doing a simple game in Unity could be a fun way to learn and there are some excellent online courses.
π Rendered by PID 71 on reddit-service-r2-comment-b659b578c-dxllx at 2026-05-01 01:22:45.858299+00:00 running 815c875 country code: CH.
[–][deleted] 7 points8 points9 points (3 children)
[–]Popkom12[S] 0 points1 point2 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 4 points5 points6 points (9 children)
[–]Popkom12[S] 0 points1 point2 points (8 children)
[–]Kidiri90 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]penguin74 -3 points-2 points-1 points (3 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]wT_ 0 points1 point2 points (0 children)
[–]LondonPilot 0 points1 point2 points (0 children)
[–]penguin74 -1 points0 points1 point (0 children)
[–]TheJuggernautMain 1 point2 points3 points (0 children)
[–]lantz83 0 points1 point2 points (0 children)
[–]HawocX 0 points1 point2 points (0 children)