Tries to get element value.

Namespace: Cudafy
Assembly: Cudafy (in Cudafy.dll) Version: 1.0.4106.20170

Syntax

C#
public static string TryGetElementValue(
	this XElement element,
	string elementName
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function TryGetElementValue ( _
	element As XElement, _
	elementName As String _
) As String
Visual C++
[ExtensionAttribute]
public:
static String^ TryGetElementValue(
	XElement^ element, 
	String^ elementName
)

Parameters

element
Type: System.Xml.Linq..::..XElement
The element.
elementName
Type: System..::..String
Name of the element.

Return Value

Value of element or null if element does not exist.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also