Click or drag to resize

ExtensionMethodsGetOptionalAttributeT Method (XmlReader, String, FuncString, T)

Gets the value of an optional attribute. If the attribute isn't present, string.Empty is returned.

Namespace:  SD.LLBLGen.Pro.Core.Xml
Assembly:  SD.LLBLGen.Pro.Core (in SD.LLBLGen.Pro.Core.dll) Version: 5.9.0.0 (5.9.0)
Syntax
public static T GetOptionalAttribute<T>(
	this XmlReader reader,
	string attributeName,
	Func<string, T> conversionFunc
)

Parameters

reader
Type: System.XmlXmlReader
The reader.
attributeName
Type: SystemString
Name of the attribute.
conversionFunc
Type: SystemFuncString, T
The conversion func.

Type Parameters

T

Return Value

Type: T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XmlReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also