Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: T ValueOrDefault<T>(this XElement, XName, T)

Declaration

public static T ValueOrDefault<T>(
    this XElement element,
    XName name,
    T defaultValue
)

Summary

Returns the value of this element, converted to type T. If the element does not exist returns the default value. If the element's value cannot be converted, throws an exception.

Generic type parameters

TThis type parameter is not documented.