User Profile
Collapse
-
Thank you very much. I have found the answer right after I posted my question... Since I know a little about VB, and it will assign an default value for var when I didnt do so, so I was supposed...you know... Anyway, thanks for your reply. have a good night. -
error of "use of unassigned local variable"
Hi, I am new in learning c#, and have recently encountered a problem:
...Code:static float ComputeAvg(float[] a) { float sum; int i; for (i = 0; i <= a.Length; i++) { sum = sum + a[i]; } float avg = sum / (i-1); return avg;Last edited by tlhintoq; Mar 24 '10, 05:31 AM. Reason: [CODE] ...Your code goes between code tags [/CODE]
No activity results to display
Show More
Leave a comment: