SecurityElement.SearchForTextOfTag Method
.NET Framework 4.5
Finds a child by its tag name and returns the contained text.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- tag
- Type: System.String
The tag for which to search in child elements.
Return Value
Type: System.StringThe text contents of the first child element with the specified tag value.
| Exception | Condition |
|---|---|
| ArgumentNullException | tag is null. |
The following code shows the use of the SearchForTextOfTag method to find a child by its tag name and return the contained text. This code example is part of a larger example provided for the SecurityElement class.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.