Click or drag to resize
XmlExtensionMethodsWriteOptionalElementStringT Method (XmlWriter, String, T, String, T)
Writes an optional element string. If elementValue is equal to the default null value specified, no element is written.

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 void WriteOptionalElementString<T>(
	this XmlWriter writer,
	string elementName,
	T elementValue,
	string elementValueAsString,
	T defaultNullValue
)

Parameters

writer
Type: System.XmlXmlWriter
The writer.
elementName
Type: SystemString
Name of the element.
elementValue
Type: T
The element value.
elementValueAsString
Type: SystemString
The element value as string.
defaultNullValue
Type: T
The default null value.

Type Parameters

T

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type XmlWriter. 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