I want the users of my program to be able to repeat an action until they instruct the program to stop running by entering a certain string. I'm trying to allow the user to stop a program by entering the word "stop" by using: 

```
If (sequenceSelector.ToUpper().Contains("stop"))    
{
    //code to do stuff here
}

```

Currently the only place the variable `sequenceSelector` can be accessed is encapsulated in this try block.

```
try
{                    
    int sequenceSelector = Convert.ToInt32(Console.ReadLine());

    if (sequenceSelector <=0)
    {
        throw new IndexOutOfRangeException();
    }
    String outputString = "[" + sequenceSelector.ToString() + "]: ";
    for (int i = 0; i < sequenceSelector; i++)
    {
        outputString = outputString + fibonacciSequence.GetValue(i).ToString() + ", ";
    }

    Console.WriteLine(outputString);

    return sequenceSelector;
}

```

This causes a problem because one of the catch blocks related is:

```
catch (FormatException)
{
    Console.WriteLine("Invalid input detected! Please enter a number that is not <=0 and not > 20");
    return null;
}

```

This prevents the user from entering any non-numerical characters because `sequenceSelector` must be an `int` in order for the program to function correctly.

I want to be able to let the user enter the word "stop" as part of the program. How can I do this get around the exception handling in order to do this?