Lets start over...
You have your main method which runs when your application starts :
internal static void Main()
{
VisitPlanets(2);
}
Notice that
VisitPlanets
is your static method you are calling, and this method takes a parameter of type int.
So when you say
VisitPlanets(2);
- you are passing that parameter of number 2 to the static method
VisitPlanets
.
Each time you call this method you will output to the console the contents of times you visited x amount of planets based of the int in
numberOfPlanets
which is your declaration. And this is what
@jmcilhinney was trying to point out to you :
public static void VisitPlanets(int numberOfPlanets)
{
Console.WriteLine($"You visited {numberOfPlanets} new planets.");
}
Does this make sense now?
Frankly, only I recall what it was like to once be a starter programmer. I'm not going to say much in the way of how you've over reacted above. I know what its like to have once been a learner, and I recall being haggled by experienced programmers for not knowing something I clearly should have in my earliest days. When someone expects you to know something, and you don't, this is a sure sign that you are following a terrible programming guide or you are skipping the "
boring chapters" for the sake of progressing that little bit further a little quicker. If this is what you are doing, its an injustice to yourself. Spend time learning the basics, and read as much documentation as you can possibly digest. As this is ultimately the best and only way to learn any language.
If you were following the getting started tutorials from Microsoft; ie. the ones in my signatures spoiler. You would never have needed to ask this question, because you would have learned this in the later chapters of their getting started guide to C#. Difficult as it often is. Try not to read to much into what people write back to you online. What's often meant as words of encouragement can sometimes come across condescending and that's because its easy to misunderstand someone when reading words on a screen.
You're overreacting too. I don't see anything wrong with the replies you received from JM. Yes his replies are a little blunt but necessary in this case. Take the criticism on the chest and up your game with your learning experience. If you continue to be nice, keep your cool, ask more questions, and ask for links to documentation covering the questions you are asking us. You will find he can be very helpful to progress this learning curve you're on.