C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2722
Number of posts: 5749

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Re: ERROR: Not all code paths return a vale Posted by Funmilade on 29 May 2012 at 3:28 PM
Hi,

I must admit that I am unable to fully comprehend your code, since you did not include the Main method, and it looks somewhat scanty.

Looking at the signature of your method i.e.,

public static long CalculateScore(byte chances, long millisec) 


it is clear that all paths through the method must return a value of type long.

Please check the code to ensure all if-else, switch-case or other conditional statements always result in the method returning a value of type long.

Hope it helps.

Edward
Thread Tree
visper007 ERROR: Not all code paths return a vale on 26 May 2012 at 11:35 AM
Funmilade Re: ERROR: Not all code paths return a vale on 29 May 2012 at 3:22 PM
Funmilade Re: ERROR: Not all code paths return a vale on 29 May 2012 at 3:24 PM
Funmilade Re: ERROR: Not all code paths return a vale on 29 May 2012 at 3:28 PM
magnetsoftees Re: ERROR: Not all code paths return a vale on 17 Aug 2012 at 5:18 AM



 

Recent Jobs