Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

VBNet dictionary for each

Sub Main()
        ' Step 1: create Dictionary with 4 keys.
        Dim colors As New Dictionary(Of String, Integer)
        colors.Add("blue", 32)
        colors.Add("yellow", 16)
        colors.Add("green", 256)
        colors.Add("red", 100)

        ' Step 2: use For Each loop over pairs.
        For Each pair As KeyValuePair(Of String, Integer) In colors
            Console.WriteLine("COLOR: {0}, VALUE: {1}", pair.Key, pair.Value)
        Next
    End Sub
Comment

PREVIOUS NEXT
Code Example
Csharp :: dataannotations for currency in c# 
Csharp :: IOException: Failed to prepare target build directory. Is a built game instance running? UnityEditor.WindowsStandalone.WindowsDesktopStandalonePostProcessor.DeleteDestination (UnityEditor.Modules.BuildPostProcessArgs args) 
Csharp :: unity fast sin 
Csharp :: c# button click gets assigned the last value 
Csharp :: how to make diagonal movement not double the speed of the player in unity 
Csharp :: asp.net store list in web.config 
Csharp :: hive survive 
Csharp :: Uninstall-SPSolution: This solution contains resources scoped for a Web application and must be retracted from one or more Web applications. 
Csharp :: c# yes no cancel dialog with icons 
Csharp :: c# nunit assert.contains 
Csharp :: decode token to get claims value 
Csharp :: c# entity mvc get user from razor layout 
Csharp :: how to change the color of a single line of code in c# 
Csharp :: c# return statement 
Csharp :: c# base vs this 
Csharp :: // Force WPF to render UI changes immediately with this magic line of code... 
Csharp :: c# ushort 
Csharp :: prevent C# app from lingering after closing in background processes 
Csharp :: whining 
Csharp :: back color for DateTimePicker control 
Csharp :: cors denied error in asp.net core 
Csharp :: how to instantiate particle system with a particular rotation 
Csharp :: C# check control type 
Csharp :: == vs equals c# 
Csharp :: wpf clock conrt 
Csharp :: c# uri to string 
Csharp :: c# .net core kendo dropdownlistfor enum 
Csharp :: c# remove exit icon 
Csharp :: when creating a new boolean column in an existing table how to set the default value as true in c# models code first 
Csharp :: c sharp making our custom function 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =