|
-
Mar 8th, 2010, 06:43 PM
#1
Thread Starter
New Member
How to write it in VB.NET?
Creating a constant Dictionary in C#
Code:
Dictionary<string, int> ids = new Dictionary<string, int> {
{"abc",1}, {"def",2}, {"ghi",3}
};
How to write the same in VB?
-
Mar 8th, 2010, 06:52 PM
#2
Re: How to write it in VB.NET?
vb Code:
Dim ids As New Dictionary(Of String, Integer)
ids.Add("abc", 1)
ids.Add("def", 2)
ids.Add("ghi", 3)
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 8th, 2010, 07:06 PM
#3
Thread Starter
New Member
Re: How to write it in VB.NET?
It's too obvious to be what I need in Sorry...
-
Mar 8th, 2010, 07:24 PM
#4
Re: How to write it in VB.NET?
In VB10 (VS 2010), you can have:
Code:
Dim ids As New Dictionary(Of String, Integer)() From {{"abc",1}, {"def",2}, {"ghi",3}}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|