Agnel Fernando

Agnel Fernando

  • NA
  • 5
  • 2.2k

"Use of unassigned local variable" error.

Jan 29 2016 12:49 AM
I am very new to programming. I am doing my first project in C#.
I have declared two variables, "row"and  "col" in the initial declaration step in main function. However the error of "use of unassigned local variable col" and "use of unassigned local variable row" is encountered in a  particular for loop in my code. I do not know how to rectify it. I tried declaring col and row again inside the said for loop but then when i did so, it showed me an error that it is already declared in main.
Kindly help. 

Answers (5)