0
Method don't reaches it's end.
Can someone please explain this to me: why am I getting this message which says: method never reaches it's end or a ' return ' statement.
6 Antworten
+ 2
Your method is recursive with no ending base case(s) and is also missing a closing } here. It's an infinite loop and never exits the method.
+ 1
Could you give me an example?
0
static void PrintToPoint (float [ ] p) {
}
0
When I move over the method name, I get the message: method never.. etc
0
This is the full method:
static void PrintToPoint ( float [ ] p ) {
PrintToPoint ( new float [3] {p [0], p [1], p [2] } );
0
Thanks for the explanation. I'm still learning my way to programming. Can you please show me where is the infinite loop? I mean, how can I tell if there is an infinite loop, like in my method? Thank you again.