Iterate through a datatable columns using lambda expression : I want to iterate through datatable columns using lambda expression. Currently I'm trying with foreach. Below is the sample code.

    foreach (DataColumn x in registeredpeople.Columns)
            {
                Response.Write(tab + x.ColumnName);
                tab = "\t";
            }

I want to achieve something like this, which we can do with the collection of list.

    exampleCollection.ForEach(x =>
                {
                    sample.ID = x.Value,
                    sample.Name = x.Text
                });

 