I think what you're looking for was what the guy way up there ^ mentioned. break;. You may want to use an if statement like this:

while (loop_needs_to_be_run == true)
{
// Yada, yada, yada...