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.11.0.0 (5.11.23.1114)
Syntax public static void WriteOptionalElementString<T>(
this XmlWriter writer,
string elementName,
T elementValue,
string elementValueAsString,
T defaultNullValue
)
<ExtensionAttribute>
Public Shared Sub WriteOptionalElementString(Of T) (
writer As XmlWriter,
elementName As String,
elementValue As T,
elementValueAsString As String,
defaultNullValue As T
)
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