Hint: Local variable "c" does not seem to be initialized
This usually happens when you are accesing your variable only from within if statements, case statements and while loops. The reason for this is that under certain circumstances theese variables arent even used so compiler optimization sometimes doesn't even initalize them which can result in AccesViolation or weird values of theese varaibles.
I usually circumvent this by seting some default value to theese variables in the first few lines of the method in which they are declared.