Chinnu
Chinnu

Reputation: 1

how to Convert to VB.NET code in linq

Please convert this code to VB.NET.

var catcopy2 = categories.AsEnumerable().Select(x => new CategoriesBackup() {
    CategoryID = x.CategoryID,
    CategoryName = x.CategoryName,
    Description = x.Description,
    Picture = x.Picture
});

Upvotes: 0

Views: 336

Answers (1)

Pranay Rana
Pranay Rana

Reputation: 176886

check this tool : http://www.developerfusion.com/tools/convert/csharp-to-vb/

Dim catcopy2 = categories.AsEnumerable().[Select](Function(x) New CategoriesBackup() With { _
    Key .CategoryID = x.CategoryID, _
    Key .CategoryName = x.CategoryName, _
    Key .Description = x.Description, _
    Key .Picture = x.Picture _
})

Upvotes: 1

Related Questions