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.

using System;

namespace OutParameters
{
  class Program
  {
    static void Main(string[] args)
    {
      string scoreAsString = "85.6";
      string statement = "Hello World";
      
    
      double scoreAsDouble;
       bool outcome;
       outcome = Double.TryParse(scoreAsString, out scoreAsDouble);

       Console.WriteLine($"{outcome} \n {scoreAsDouble}");
         Whisper(statement, out bool marker);

    }  

   static string Whisper(string statement, out bool marker){
    string statement = "Hello World";
    statement = statement.ToLower(); 

  

   }
    
    }
}



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.
Was this page helpful?