G
Guest
I am using the code below to create a integer array.
while(dr.Read())
{
string StateID=dr["StateID"].ToString();
int FacilityID=Convert.ToInt32(dr["FacilityID"].ToString());
int [] FacilityIDs={FacilityID};
}
However, the last line int [] FacilityIDs={FacilityID}; only adds on value
to the array not all of the values.
What am I doing wrong?
Thanks
while(dr.Read())
{
string StateID=dr["StateID"].ToString();
int FacilityID=Convert.ToInt32(dr["FacilityID"].ToString());
int [] FacilityIDs={FacilityID};
}
However, the last line int [] FacilityIDs={FacilityID}; only adds on value
to the array not all of the values.
What am I doing wrong?
Thanks