I've always thought that a method different than void must return a value no matter what however if we have this for example
private int Foo()
{
while (true)
{
}
}
There's no compile-time errors here and I think that's because the loop is infinite C# can guarantee that it wont terminate without returning a value. Am I correct ?