Possible Duplicate:
Anonymous class initialization in VB.Net
Trying to convert examples like this from C# to VB.Net leaved me scratching my already bald head...:
public ActionResult GridData(string sidx, string sord, int page, int rows) {
var jsonData = new {
total = 1, // we'll implement later
page = page,
records = 3, // implement later
rows = new[]{
new {id = 1, cell = new[] {"1", "-7", "Is this a good question?"}},
new {id = 2, cell = new[] {"2", "15", "Is this a blatant ripoff?"}},
new {id = 3, cell = new[] {"3", "23", "Why is the sky blue?"}}
}
};
return Json(jsonData);
}
My problem is, how can I fill the jsonData variable in a similar way in VB.Net - even with sub-arrays(rows)?
How can I fill do the same thing as this - but in VB.Net?
I have switched from VB.Net to C# for future projects, because there is so much more sourcecode and examples out there in C#... But for now I still have to work on several VB.Net projects, so I keep running into these challenges.
Code is from Haack's blogpost on doing JqGrid in ASP.Net MVC.