gpt4 book ai didi

vb.net - 如何在VB.NET中直接填充Dictionary(Of TKey, TValue)

转载 作者:行者123 更新时间:2023-12-02 09:58:03 25 4
gpt4 key购买 nike

有没有办法在 VB.NET 中做同样的事情?

Dictionary<int, string> myDict = new Dictionary<int, string>()     
{
{ 2, "This" },
{ 1, "is" },
{ 5, "radio" },
{ 12, "clash" },
};

最佳答案

正如上面 Marcel 的评论所述:

Dim myDict As New Dictionary(Of Integer, String) From _
{{1, "one"}, {2, "two"}, {3, "three"}}

关于vb.net - 如何在VB.NET中直接填充Dictionary(Of TKey, TValue),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3300003/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com