As soon as return is found in a method (in this case, the Get accessor for the InvoiceFullName property), the return value is returned, and execution of the method stops:
Code:
get
{
return istrFullName;
// THIS IS TELLING ME UNREACHABLE CODE
Console.WriteLine(istrFullName);
}
As you can see, the Console.WriteLine call occurs after the return statement and is therefore unreachable. Swap the two statements and you should be fine:
Code:
get
{
Console.WriteLine(istrFullName);
return istrFullName;
}
Not sure about the other problems you're having though. Can you elaborate a bit?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.