public SecurityElement SearchForChildByTag(string tag)
{
// Go through all the children and see if we can
// find the one are are asked for (matching tags)
if (tag == null)
throw new ArgumentNullException(nameof(tag));
// Note: we don't check for a valid tag here because
// an invalid tag simply won't be found.
if (_children == null)
return null;
foreach (SecurityElement current in _children)
{
if (current != null && string.Equals(current.Tag, tag))
return current;
}
return null;
}