You are here: RainWorx.FrameWorx.MVC Namespaces > RainWorx.FrameWorx.MVC.Helpers > HtmlHelpers Class > GetPropertyValue(T) Method

HtmlHelpersGetPropertyValueT Method

AuctionWorx 3.5 API
Returns the request property as the specified type

Namespace:  RainWorx.FrameWorx.MVC.Helpers
Assembly:  RainWorx.FrameWorx.MVC (in RainWorx.FrameWorx.MVC.dll) Version: 3.5

Syntax

C#
public static T GetPropertyValue<T>(
	this List<CustomProperty> properties,
	string key,
	T defaultValue
)
where T : IConvertible

Parameters

properties
Type: System.Collections.GenericListCustomProperty
a list of CustomProperty objects
key
Type: SystemString
the name of the custom field associated with this property
defaultValue
Type: T
this value will be returned if the property is missing or invalid

Type Parameters

T
the specified type to convert the value to

Return Value

Type: T

Usage Note

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

Reference

Copyright © 2002-2022. RainWorx Software. All rights reserved.