question about out parameters
hi,
i am early in my C# learning journey, and i've been really struggling with building methods , optional and out parameters.
an excercise i did today resulted in this block of code, and i have some clarification questions.
first question: why does Double.TryParse ask me to declare all the variables it uses beforehand, including the out "scoreAsDouble", but the second method Whisper didn't require me to declare the out bool marker?
second question: i am struggling to understand what should go in the Main method and what should go inside any other methods, as my lessons have been somewhat inconsistent with that information. any clarifications would be immensely appreciated.
i apologize for the ugly and poorly formatted code with empty spaces. i promise it hurts me just as it hurts you.
i am early in my C# learning journey, and i've been really struggling with building methods , optional and out parameters.
an excercise i did today resulted in this block of code, and i have some clarification questions.
first question: why does Double.TryParse ask me to declare all the variables it uses beforehand, including the out "scoreAsDouble", but the second method Whisper didn't require me to declare the out bool marker?
second question: i am struggling to understand what should go in the Main method and what should go inside any other methods, as my lessons have been somewhat inconsistent with that information. any clarifications would be immensely appreciated.
i apologize for the ugly and poorly formatted code with empty spaces. i promise it hurts me just as it hurts you.