Adding to Sandeep's answer, change the order in which you do things so that your initialization works better.
You need to get your data before you can initialize the array to its required size.
string[] values;
DataTable dtreceptionisttmslot = (DataTable)cnt.GetRecord("select first_appointment_time from tblValidAppointmentTime ");
if( dtreceptionisttmslot != null && dtreceptionisttmslot.Rows.Count > 0 )
{
values = new string[dtreceptionisttmslot.rows.count];
}
My personal take is that this would work better
List<string> values = new List<string>();
DataTable dtreceptionisttmslot = (DataTable)cnt.GetRecord("select first_appointment_time from tblValidAppointmentTime ");
foreach( DataRow dr in dtreceptionisttmslot.rows )
{
values.Add( yourNewValue );
}