|
XmlExtensionsFormat Method
|
Formats the contents of an XML element and returns the result.
Namespace: GSF.XmlAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntaxpublic static Object Format(
this XElement element
)
<ExtensionAttribute>
Public Shared Function Format (
element As XElement
) As Object
public:
[ExtensionAttribute]
static Object^ Format(
XElement^ element
)
[<ExtensionAttribute>]
static member Format :
element : XElement -> Object
GSF.Xml.XmlExtensions.Format = function(element);
View SourceParameters
- element XElement
- The elements whose contents are to be formatted.
Return Value
ObjectThe formatted contents of the elements.
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
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
The format to be used is determined by the type and spec
attributes of the element. The type attribute should be the fully
qualified type name of an IFormattable type. The spec
attribute defines the format string to be used when formatting the contents.
If type or spec are not defined or if type resovles to
a type that is not IFormattable, the contents are not formatted
and are returned as-is.
See Also