vb.net - Merge two string fields with LINQ into a string array -


i have 2 fields in dataset [firstname] , [lastname]. system.data.enumerablerowcollection object following query:

dim query = dt in _dataset.datatable1 teamname = "the avangers" select dt.firstname , dt.lastname 

i looking way merge firstname , lastname stringarray following entries:

item(0): "banner, bruce" item(1): "stark, tony" item(2): "rogers, steve" ... 

what did performed separate query first , lastname use .toarray on both queries. afterwards merged them in each loop. wanted ask if there faster way perform that.

just concatenate firstname , lastname in query , apply toarray @ end.

select dt.lastname + ", " &  dt.firstname  

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -