Use of unassigned local variable - if statements
I'm doing the following block of code and the compiler is complaining about unassigned local variables and could use some help identifying what's up. while (rsData.Read()) { if (rsData["TYPE"] != DBNull.Value) strType = rsData["TYPE"].ToString().Trim(); if (strType == "01") { if (rsData["Text"] != DBNull.Value) strwho = rsData["Text"].ToString(); if ((strwho.Length < 10 || (strwho.IndexOf("NULL") > 1))) strwho = ""; } else if (strType == "07") { if (rsData["Text"] != DBNull.Value) strmetades = rsData["Text"].ToString(); if ((strmetades.Length < 10 || (strmetades.IndexOf("NULL") > 1)))