Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Dictionary namespace c#


private Dictionary<string, string> users = new Dictionary<string, string>();

public void Set(string key, string value)
{
    if (users.ContainsKey(key))
    {
        users[key] = value;
    }
    else
    {
        users.Add(key, value);
    }
}

public string Get(string key)
{
    string result = null;

    if (users.ContainsKey(key))
    {
        result = users[key];
    }

    return result;
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: void on trigger enter 2d 
Csharp :: C# get pc language 
Csharp :: how to stop window from terminating c# visual studio 
Csharp :: unity get mouse position 
Csharp :: write string multiple times c# 
Csharp :: c# if file exists 
Csharp :: unity get distance between two objects 
Csharp :: iso date format c# 
Csharp :: wpf bind to self 
Csharp :: get max enum value c# 
Csharp :: c# list to string 
Csharp :: Program for factorial of a number in c# 
Csharp :: unity c# on trigger enter with specific gameobject 
Csharp :: dotnet executable directory 
Csharp :: asp.net core get request ip address 
Csharp :: unity override 
Csharp :: newline in button wpf 
Csharp :: c# unzip files 
Csharp :: 2d unity point at 
Csharp :: how to exit application c# console 
Csharp :: unity detect number key 
Csharp :: load scene unity 
Csharp :: mailkit send attachment 
Csharp :: set textbox colour to transparent c# 
Csharp :: c# exit application 
Csharp :: How To Copy a text C# unity 
Csharp :: how to store more data than doublec# 
Csharp :: .net loop through dictionary 
Csharp :: C# metodas duomenu paemimui veiksmams ir grazinimui 
Csharp :: getset c# 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =