この構文を使用して C# で取得したのと同じ結果を達成したいのですが、VB.NET では次のようになります。
// This is my generic object (coming from Json parsing!):
var genericContent = new { Name = "name1", Value = 0 };
// I would like to have a generic list, created by this generic item:
var myList = (new[] { genericContent }).ToList();
// So, I can add any other generic items (with the same structure)...
myList.Add(new { Name = "name2", Value = 1 });
// And treat them as a normal list, without declaring the class!
return myList.Count;
...だから、VBでジェネリック配列を作成したいだけです。
C# では問題なく動作しますが、この VB.NET の構文がわかりません...
.NET Framework 3.5 を使用しています。
ありがとうございました!