Removes specific instance of Tag class from TagGroup
Removes instance(s) of Tags, then re-optimizes TagGroup.
| Exception Type | Condition |
|---|---|
| ArgumentNullException | Thrown if Tag is a null reference (Nothing in Visual Basic) |
| ArgumentException | Thrown if Tag is not Type MBLink.Tag |
VB
Imports MBLink
Dim MyGroup As New TagGroup
Dim MyTag_1 As New Tag("40001")
Dim MyTag_2 As New Tag("40002")
MyGroup.AddTag(MyTag_1)
MyGroup.AddTag(MyTag_2)
.. elsewhere in code
MyGroup.RemoveTag(MyTag_2)
C#
using MBLink;
TagGroup MyGroup = new TagGroup();
Tag MyTag_1 = new Tag("40001");
Tag MyTag_2 = new Tag("40002");
MyGroup.AddTag(MyTag_1);
MyGroup.AddTag(MyTag_2);
... elsewhere in code
MyGroup.RemoveTag(MyTag_1);
TagGroup Class | MBLink Namespace | AddTag | Clear | Count