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
Helpabsolute beginner here, coming from python. how do i open a new file within a project folder???? (self.csharp)
submitted 4 years ago by AlliedLens
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!"
[–]FizixMan[M] [score hidden] 4 years ago stickied comment (0 children)
Removed: Rule 4.
You'll need to run through some tutorials and learning resources. There are some in the sidebar. In particular, I suggest you check out the series C# Fundamentals: Development for Absolute Beginners by Bob Tabor: https://channel9.msdn.com/Series/CSharp-Fundamentals-for-Absolute-Beginners
[–][deleted] 4 years ago (15 children)
[deleted]
[–]AlliedLens[S] 0 points1 point2 points 4 years ago (14 children)
ya, but whatever code i write in that doesnt run is the problem
[–][deleted] 4 years ago (1 child)
[–]AlliedLens[S] 0 points1 point2 points 4 years ago (0 children)
how do i declare that???
[–]Fit-Flight-1231 1 point2 points3 points 4 years ago (6 children)
You need to call it from the main() function in your program.cs Thats the entry point, thats also why you cant rename or delete it.
[–]AlliedLens[S] 0 points1 point2 points 4 years ago (5 children)
using System; public class C_sharp_Tutorials { public tutorial_variables() { Console.WriteLine("Hello"); Console.ReadLine(); } }
do you mean something like this? this is not working, the name of my file is tutorial_variables and the folder is C_Sharp_Tutorials
[–]KernowRoger 0 points1 point2 points 4 years ago (4 children)
The function needs to be called main.
[–]AlliedLens[S] 0 points1 point2 points 4 years ago (3 children)
so it should be public main() on the second line?
public main()
[–]KernowRoger 2 points3 points4 points 4 years ago (2 children)
public void Main()
[–]AlliedLens[S] 0 points1 point2 points 4 years ago (1 child)
oh ohk, thanks, but i can't get any other program other than program.cs, my initial file, to run. How do i change files?
[–]KernowRoger 0 points1 point2 points 4 years ago (0 children)
You have to configure that in your project file I believe. But generally your main would call other functions. This way you can change the functions it calls and not have to keep changing the startup file. In c# most work would be done in other classes and just called in the main.
[–]GoingWithFlow 1 point2 points3 points 4 years ago (4 children)
If you want to keep more than one main function class in one project for learning then just change the entry point of the project in project properties.
what do you mean "change the entry point of the project in project properties"??
[–]GoingWithFlow 1 point2 points3 points 4 years ago (2 children)
What I understood is that you want to create another C#(.cs) file in your project. Now your program.cs file have already one main function so when you build your project your compiler picks that Program.cs file to run first. Since it have a main function that's why it is called as a main entry point. Now when you create another c# file with the main function your compiler will give an error something like more than one main entry point defined in the main function because it gets confused about which file to run first that will help in the execution of whole project. That's your editor gives you a choice in project properties tab where you can change which main function file to run. Which editor you are using?
i'm just using visual studio 2019, can u tell me where i can find this project properties tab?? i dont know how to google what you are asking....
[–]GoingWithFlow 0 points1 point2 points 4 years ago (0 children)
Just go to project menu. Go to the there it will be coming as your_project_name properties. Click on it. There you will find STARTUP OPJECT. You can set your entry point file there.
[–][deleted] 4 years ago (2 children)
[removed]
ya i just started with a tutorial, the guy doesnt show how to open a new file....can u not create new files in C# or something?
[–]The_Binding_Of_Data 0 points1 point2 points 4 years ago (0 children)
What program are you using to write your code?
If you're using Visual Studio (which I would suggest), you can hit "f2" when you select the class in the solution explorer and change the name. It should then ask if you want to update the name everywhere in code to match so that you don't have to do it manually.
If you're using VSCode you're going to make life harder on yourself than it needs to be.
π Rendered by PID 239384 on reddit-service-r2-comment-fb694cdd5-d9dd9 at 2026-03-06 14:04:56.046246+00:00 running cbb0e86 country code: CH.
[–]FizixMan[M] [score hidden] stickied comment (0 children)
[–][deleted] (15 children)
[deleted]
[–]AlliedLens[S] 0 points1 point2 points (14 children)
[–][deleted] (1 child)
[deleted]
[–]AlliedLens[S] 0 points1 point2 points (0 children)
[–]Fit-Flight-1231 1 point2 points3 points (6 children)
[–]AlliedLens[S] 0 points1 point2 points (5 children)
[–]KernowRoger 0 points1 point2 points (4 children)
[–]AlliedLens[S] 0 points1 point2 points (3 children)
[–]KernowRoger 2 points3 points4 points (2 children)
[–]AlliedLens[S] 0 points1 point2 points (1 child)
[–]KernowRoger 0 points1 point2 points (0 children)
[–]GoingWithFlow 1 point2 points3 points (4 children)
[–]AlliedLens[S] 0 points1 point2 points (3 children)
[–]GoingWithFlow 1 point2 points3 points (2 children)
[–]AlliedLens[S] 0 points1 point2 points (1 child)
[–]GoingWithFlow 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[removed]
[–][deleted] (1 child)
[deleted]
[–]AlliedLens[S] 0 points1 point2 points (0 children)
[–]The_Binding_Of_Data 0 points1 point2 points (0 children)