I am not sure what the problem is but I keep receiving this error when I try to use a while statement in my code.
Invalid token \'while\' in class,
C# is not allowed to write code directly into the classes; it is allowed to write only data members and function members directly into the classes.