INGEAR.NET.ABLink

 

TagGroup.Count Property

Returns the number of Tag classes in the TagGroup collection

[Visual Basic]
NotOverridable Public ReadOnly Property Count As Integer _
    Implements IGroup.Count
[C#]
public int Count {get;}

Implements

IGroup.Count

 

Example

VB
' ***********************************
' * initialize the Controller class
Dim MyPLC as New ABLink.Controller()
' ***********************************
' * initialize TagGroup class
Dim tagGroup as New ABLink.TagGroup
' ***********************************
' * initialize tag classes
Dim Tag1 as New ABLink.Tag("N7:0")
Dim Tag2 as New ABLink.Tag("N7:13")
Dim Tag3 as New ABLink.Tag("F8:100")
'************************************
'* add tags to the group
tagGroup.AddTag(Tag1)
tagGroup.AddTag(Tag2)
tagGroup.AddTag(Tag3)
' ***********************************
' * number of tags in group
Console.WriteLine(tagGroup.Count.ToString())
 
C#
///////////////////////////////////////
// initialize the Controller class
ABLink.Controller MyPLC = new ABLink.Controller();
///////////////////////////////////////
// initialize TagGroup class
ABLink.TagGroup tagGroup = new ABLink.TagGroup();
///////////////////////////////////////
// initialize tag classes
ABLink.Tag Tag1 = new ABLink.Tag("N7:0");
ABLink.Tag Tag2 = new ABLink.Tag("N7:13");
ABLink.Tag Tag3 = wew ABLink.Tag("F8:100");
///////////////////////////////////////
// add tags to the group
tagGroup.AddTag(Tag1);
tagGroup.AddTag(Tag2);
tagGroup.AddTag(Tag3);
///////////////////////////////////////
// number of tags in the group
Console.WriteLine(tagGroup.Count.ToString());

See Also

TagGroup Class | ABLink Namespace | RemoveTag | Clear | AddTag | Tags