c# - Converting a LINQ result to 2D string array -


i have linq query selects list of teamids , team names populate drop down list. query looks this:

var teams = db.teams.where(t => t.isactive)                     .select(t => new {t.teamid, t.teamname}); 

however, want result set in form of 2d string array, since that's function populates ddls requires. know can use loop , build array, i'd prefer it, if possible in 1 step.

is there similar this?

string[][] teams = db.teams.where(t => t.isactive)                            .select(t => new {t.teamid, t.teamname})                            .to2darray(); 

kind of:

string[][] teams = db.teams.where(t => t.isactive).select(t => new[] {t.teamid, t.teamname}).toarray(); 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -