You have declared the
- which means it returns a single instance of the class
To simplify it, you would get the same error with this code:
private int Fail()
return "Hello world";
is declared as returning a integer, and you are returning a string. You can't implicitly cast a string to an integer - because it might be the text "Hello world" and that doesn't have a numeric equivalent - so the sytem tells you you have made a mistake somewhere.
method returns a
which is a collection of
objects, and even the individual instances have no obvious relation to the return type!
We can't fix that for you: I have no idea what the heck you expect that to return, and much less idea where it might get that information from!