Sorry for the stupid question, but I've been there and done that. Just
that just now I have forgotten it for the moment. It happens when
you're in a totally different rut of thought. Bail me out here.
Just to quote an example:
static void Main(string[] args)
{
Console.WriteLine((new Class1()).SomeMethod((Object)19));
}
public int SomeMethod(System.Object obj)
{
if (obj == null)
throw new System.Exception("The argument is null.");
if ((int)obj >= 10)
return (int)obj;
}
Error: Class1.cs(13): 'Exception.Class1.SomeMethod(object)': not all
code paths return a value
How do you get out of this?