06.HighQualityMethodsHomework/RefactorCSharpPart2Exam/11. CSharp-Part-2-Exam/CSharp-Part-2-Exam/CATaclysm/CATaclysm.cs
/// <summary>
/// Adds a found variable to the specified collection of variables determined by its scope
/// </summary>
/// <param name="variable">Variable to add</param>
/// <param name="scope">Scope of the variable to add</param>
Adds a found variable to the specified collection of variables determined by its scope
Adds a found variable to the specified collection of variables determined by its scope
private static void AddFoundVariable(string variable, string scope)
        {
            switch (scope)
            {
                case "Loop":
                    loopsVariables.Add(variable);
                    return;
                case "Conditional Statement":
                    conditionalStatementsVariables.Add(variable);
                    return;
                default:
                    methodVariables.Add(variable);
                    return;
            }
        }
private static void AddFoundVariable ( string variable , string scope ) { switch ( scope ) { case " " : loopsVariables . Add ( variable ) ; return ; case " " : conditionalStatementsVariables . Add ( variable ) ; return ; default : methodVariables . Add ( variable ) ; return ; } }
Adds a found variable to the specified collection of variables determined by its scope
Adds a found variable to the specified collection of variables determined by its scope
variable
string
Variable to add
Variable to add
scope
string
Scope of the variable to add
Scope of the variable to add