DataTable转成 string[] 两种

  string[] ary = Array.ConvertAll(dt_keyword.Rows.Cast().ToArray(), r => r["F1"].ToString());
            string[] ary1 = dt_keyword.Rows.OfType().Select(row => Convert.ToString(row[""])).ToArray();

你可能感兴趣的:(.net,2014)