Method Add
Add(String, Nullable<Int32>)
Adds an integer value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, int? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Integer value of an item. |
Examples
The following example adds named tag of integer type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Nullable<Int16>)
Adds a short value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, short? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Short value of an item. |
Examples
The following example adds the named tag of a short type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Nullable<Byte>)
Adds a byte value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, byte? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Byte value of an item. |
Examples
The following example adds the named tag of byte type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Nullable<Int64>)
Adds a long value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, long? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Long value of an item. |
Examples
The following example adds named tag of long type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", long.MaxValue);
Add(String, Nullable<Single>)
Adds a float value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, float? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Float value of an item. |
Examples
The following example adds named tag of float type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", float.MaxValue);
Add(String, Nullable<Double>)
Adds a double value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, double? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Double value of an item. |
Examples
The following example adds named tag of double type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", double.MaxValue);
Add(String, Nullable<Decimal>)
Adds a decimal value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, decimal? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Decimal value of an item. |
Examples
The following example adds named tag of decimal type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", decimal.MaxValue);
Add(String, String)
Adds a string value against a key in the the NamedTagsDictionary.
Declaration
public void Add(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | String value of an item. |
Examples
The following example adds named tag of string type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", "Tag1_Value");
Add(String, Nullable<Char>)
Adds a character value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, char? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Char value of an item. |
Examples
The following example adds named tag of character type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", 'a');
Add(String, Nullable<Boolean>)
Adds a boolean value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, bool? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Boolean value of an item. |
Examples
The following example adds named tag of boolean type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", false);
Add(String, Nullable<DateTime>)
Adds a DateTime value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | DateTime value of an item. |
Examples
The following example adds named tag of DateTime type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", DateTime.Now);
Add(String, Nullable<SByte>)
Adds a sbyte value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, sbyte? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Sbyte value of an item. |
Examples
The following example adds named tag of sbyte type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", sbyte.MaxValue);
Add(String, Nullable<UInt32>)
Adds a uint value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, uint? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | uint value of an item. |
Examples
The following example adds named tag of uint type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", uint.MaxValue);
Add(String, Nullable<UInt64>)
Adds a ulong value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, ulong? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | ulong value of an item. |
Examples
The following example adds named tag of ulong type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", ulong.MaxValue);
Add(String, Nullable<UInt16>)
Adds a ushort value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, ushort? value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | ushort value of an item. |
Examples
The following example adds named tag of ushort type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", ushort.MaxValue);
Add(String, Int32)
Adds an integer value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, int value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Integer value of an item. |
Examples
The following example adds named tag of integer type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Int16)
Adds a short value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, short value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Short value of an item. |
Examples
The following example adds named tag of short type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Byte)
Adds a byte value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, byte value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Byte value of an item. |
Examples
The following example adds named tag of byte type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", int.MaxValue);
Add(String, Int64)
Adds a long value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, long value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Long value of an item. |
Examples
The following example adds named tag of long type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", long.MaxValue);
Add(String, Single)
Adds a float value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, float value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Float value of an item. |
Examples
The following example adds named tag of float type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", float.MaxValue);
Add(String, Double)
Adds a double value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, double value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Double value of an item. |
Examples
The following example adds named tag of double type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", double.MaxValue);
Add(String, Decimal)
Adds a decimal value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, decimal value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Decimal value of an item. |
Examples
The following example adds named tag of decimal type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", decimal.MaxValue);
Add(String, Char)
Adds a character value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, char value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Char value of an item. |
Examples
The following example adds named tag of character type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", 'a');
Add(String, Boolean)
Adds a boolean value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Boolean value of an item. |
Examples
The following example adds named tag of bool type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", false);
Add(String, DateTime)
Adds a DateTime value against a key in the the NamedTagsDictionary.
Declaration
public void Add(string key, DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | DateTime value of an item. |
Examples
The following example adds named tag of DateTime type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", DateTime.Now);
Add(String, SByte)
Adds sbyte value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | Sbyte value of an item. |
Examples
The following example adds named tag of sbyte type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", sbyte.MaxValue);
Add(String, UInt32)
Adds a uint value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, uint value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | uint value of an item. |
Examples
The following example adds named tag of uint type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", uint.MaxValue);
Add(String, UInt64)
Adds a ulong value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, ulong value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | ulong value of an item. |
Examples
The following example adds named tag of ulong type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", ulong.MaxValue);
Add(String, UInt16)
Adds a ushort value against a key in the NamedTagsDictionary.
Declaration
public void Add(string key, ushort value)
Parameters
Type | Name | Description |
---|---|---|
System. |
key | Key of an item. |
System. |
value | ushort value of an item. |
Examples
The following example adds named tag of ushort type.
NamedTagsDictionary tags = new NamedTagsDictionary();
tags.Add("Tag1", ushort.MaxValue);