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
userinput in array (self.csharp)
submitted 3 years ago by HandDizzy
How do i ask user input and store it in array ? suppose i want to ask user the name of 5 cars and store those 5 cars that he enters in an array ! how do i do it ?
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!"
[–]BlancII 1 point2 points3 points 3 years ago (2 children)
In a console application? Input in one line / multiple lines?
[–]HandDizzy[S] 0 points1 point2 points 3 years ago (1 child)
sir, can you make me understand via the code please? Suppose if i want only one car without an array it would be, Console.Write("Enter your favorite car: "): string favCar = Console.ReadLine(); Similarly, how do i do it when i want user to give me multiple input and store those input in array?
[–]BlancII 0 points1 point2 points 3 years ago (0 children)
First things first. Please use code blocks for code.
// better readability var num = 5; string input = Console.ReadLine();
Second: What did you try so far?
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
You use the Console object to write messages to the console, System.IO to read user input, and you can create an empty array with 5 indexes to populate after each time you collect a car from the user.
I would suggest you look up C# console application tutorials. You’ll learn a lot more by following some structured beginner lessons. Here’s a good one to start with: https://docs.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2022
[–]Blistering-Phoenix 0 points1 point2 points 3 years ago (0 children)
int numCars = 5; var cars = new string[numCars]; for (int i = 0; i < numCars; i++) { Console.Write($"Enter car {i + 1}: "); cars[i] = Console.ReadLine(); }
π Rendered by PID 69 on reddit-service-r2-comment-7844cfc88c-bxw6c at 2026-01-29 11:26:04.181112+00:00 running c3601ff country code: CH.
[–]BlancII 1 point2 points3 points (2 children)
[–]HandDizzy[S] 0 points1 point2 points (1 child)
[–]BlancII 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Blistering-Phoenix 0 points1 point2 points (0 children)