Method Add
Add(String, Int32)
Adds the key (int)value pair 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 the key (long)value pair 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 the key (float)value pair 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 the key (double)value pair 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 the key (decimal)value pair 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 the key (string)value pair 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 the key (char)value pair 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 the key (bool)value pair 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 the key (DateTime)value pair in named tags dictionary
Declaration
public void Add(string key, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Key of an item |
DateTime | value | DateTime Value of an item |
Examples
Adding named tag of DateTime type
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", DateTime.Now);