Click or drag to resize
XmlExtensionMethodsGetOptionalAttributeT 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.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.2.0.0 (5.2.17.0403)
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