Method Add
Add(String, Int32)
Adds integer value against a key in named tags dictionary.
Declaration
public void Add(string key, int value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Int32 | value | integer Value of an item |
Examples
Adding named tag of integer type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Int64)
Adds long value against a key in named tags dictionary.
Declaration
public void Add(string key, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Int64 | value | long Value of an item |
Examples
Adding named tag of long type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", long.MaxValue);
Add(String, Single)
Adds float value against a key in named tags dictionary.
Declaration
public void Add(string key, float value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Single | value | float Value of an item |
Examples
Adding named tag of float type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", float.MaxValue);
Add(String, Double)
Adds double value against a key in named tags dictionary.
Declaration
public void Add(string key, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Double | value | double Value of an item |
Examples
Adding named tag of double type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", double.MaxValue);
Add(String, Decimal)
Adds decimal value against a key in named tags dictionary.
Declaration
public void Add(string key, decimal value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Decimal | value | Decimal Value of an item |
Examples
Adding named tag of decimal type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", decimal.MaxValue);
Add(String, String)
Adds string value against a key in named tags dictionary.
Declaration
public void Add(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.String | value | string Value of an item |
Examples
Adding named tag of string type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", "Tag1_Value");
Add(String, Char)
Adds character value against a key in named tags dictionary.
Declaration
public void Add(string key, char value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Char | value | char Value of an item |
Examples
Adding named tag of character type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", 'a');
Add(String, Boolean)
Adds boolean value against a key in named tags dictionary.
Declaration
public void Add(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.Boolean | value | bool Value of an item |
Examples
Adding named tag of bool type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", false);
Add(String, DateTime)
Adds DateTime value against a key in named tags dictionary.
Declaration
public void Add(string key, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
System.DateTime | value | DateTime Value of an item |
Examples
Adding named tag of DateTime type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", DateTime.Now);