int Ultimo = ds.Tables[0].Rows[ numTot]["appo_id"];// Per recuperare spazio potresti compattarlo in int Ultimo = ds.Tables[0].Rows[ ds.Tables[0].Rows.Count]["appo_id"]