Skip to content
  • There are no suggestions because the search field is empty.

Finding if tags exist in a SLIKTag Collection

Does the SLIK-DA Toolkit have a built in method to determine if a tag exists in the SLIKTag collection?

No built-in method/function exists, but one can be written in the application relatively easily. A possible example of such a method:
private bool Contains(ISLIKTags SLIKTags, string tagName)
{
  var filteredItems = (SLIKTags).Cast<ISLIKTag>().ToList().Where(p => string.Equals(p.Name, tagName, StringComparison.OrdinalIgnoreCase));

  if (filteredItems.Count<ISLIKTag>() > 0)
      return true;
  else
      return false;
}