I have a string variable st
and i have assign this string variable to output coming form data table by using this statement
string st;
if(dt!=null)
{
if(dt.rows.count> 0)
{
st = dt.Rows[3]["timeslot_StartTime"].ToString();
}
}
now i want to convert this string variable to date time property and i have done this one by using the below statement
DateTime pt1 = DateTime.Parse(st);
but it shows error at st saying that use of unassigned local varaible "st"
.