Method not returning string value c# <List>
Posted
by
Santii20
on Stack Overflow
See other posts from Stack Overflow
or by Santii20
Published on 2012-09-26T09:32:50Z
Indexed on
2012/09/26
9:38 UTC
Read the original article
Hit count: 235
public List<string> Test_IsDataLoaded()
{
try
{
if (GRIDTest.Rows.Count != 0)
{
int countvalue = GRIDTest.Rows.Count;
GRIDTest.Rows[0].WaitForControlReady();
List<string> ReleaseIDList = new List<string>();
int nCellCount = GRIDTest.Cells.Count;
for(int nCount = 0;nCount<nCellCount ;nCount++)
{
if(nCount %5==0)
ReleaseIDList.Add((GRIDTest.Cells[0].GetProperty("Value").ToString()));
}
return ReleaseIDList;
}
}
catch (Exception)
{
}
}
Method throws me error = Not all code path return a value. Whats wrong in code.
© Stack Overflow or respective owner