Click or drag to resize

ExtensionsGetValueOrDefault Method (ResourceObject, String, Object)

Gets the value of the specified attribute, or the specified default value if the attribute doesn't exist on the object or it's value is null

Namespace:  Lithnet.ResourceManagement.Client
Assembly:  Lithnet.ResourceManagement.Client (in Lithnet.ResourceManagement.Client.dll) Version: 1.0.6435.24467
Syntax
public static Object GetValueOrDefault(
	this ResourceObject resource,
	string attributeName,
	Object defaultValue
)

Parameters

resource
Type: Lithnet.ResourceManagement.ClientResourceObject
The resource to set the value on
attributeName
Type: SystemString
Name of the attribute
defaultValue
Type: SystemObject
The defaultValue to return if attribute doesn't exist

Return Value

Type: Object

[Missing <returns> documentation for "M:Lithnet.ResourceManagement.Client.Extensions.GetValueOrDefault(Lithnet.ResourceManagement.Client.ResourceObject,System.String,System.Object)"]

Usage Note

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