2
est-il possible de faire la même chose dans VB.NET?Comment remplir Dictionary (Of TKey, TValue) directement dans VB.NET
Dictionary<int, string> myDict = new Dictionary<int, string>()
{
{ 2, "This" },
{ 1, "is" },
{ 5, "radio" },
{ 12, "clash" },
};
Même question ici http://stackoverflow.com/questions/318530/is-it-possible-to-initialise-a-new-system -collections-generic-dictionary-with-str Vérifiez la réponse de jgauffin. Voici un exemple: 'Dim myDic comme nouveau dictionnaire (Of Integer, String) De {{1," One "}, {2," Two "}}'. Ceci est seulement pour VB.NET 10 –