" Live as if you were to die tomorrow. Learn as if you were to live forever.. " - Mahatma Gandhi
Here is an easy way to convert a column of datatable to a 1 -dimensional array without for loop.
[C# Code Starts] string[] arrEmpName; DataRow[] rows = dtEmployees.Select(); arrEmpName = Array.ConvertAll(rows, row => row["EmpName"].ToString()); [C# Code Ends]
Name (required)
Mail (will not be published) (required)
Website
Enter Captcha Code * nine − = 7