using System;
public class FewGoodMen
{
static void Main(string[] args)
{
var courtCase = new Case();
bool truth = true;
int repeatQuestion = 0;
try
{
while (truth)
{
if (repeatQuestion > 5)
{
truth = false;
}
Handle(truth);
repeatQuestion++;
}
}
catch (Exception handleTruthException)
{
courtCase.Code = "Red";
courtCase.Close("YOU CAN'T HANDLE THE TRUTH!");
}
}
private static void QuestionWitness()
{
Console.WriteLine("I want the truth");
}
private static void Handle(bool truth)
{
if (!truth)
{
throw new Exception();
}
else
{
QuestionWitness();
}
}
}
public class Case
{
public string Code;
public void Close(string message)
{
Console.WriteLine(message);
}
}
public class FewGoodMen
{
static void Main(string[] args)
{
var courtCase = new Case();
bool truth = true;
int repeatQuestion = 0;
try
{
while (truth)
{
if (repeatQuestion > 5)
{
truth = false;
}
Handle(truth);
repeatQuestion++;
}
}
catch (Exception handleTruthException)
{
courtCase.Code = "Red";
courtCase.Close("YOU CAN'T HANDLE THE TRUTH!");
}
}
private static void QuestionWitness()
{
Console.WriteLine("I want the truth");
}
private static void Handle(bool truth)
{
if (!truth)
{
throw new Exception();
}
else
{
QuestionWitness();
}
}
}
public class Case
{
public string Code;
public void Close(string message)
{
Console.WriteLine(message);
}
}
Pingback: Off topic: your brain on love, movies as code, Navajo trademark battle, spelling challenge | Good Morning Silicon Valley