Click or drag to resize

imbPropertyCollectionExtensionsgetProperString Method (PropertyCollection, String, Enum)

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Prefered overload - finds the first proper value (not empty, not null) in source using fiven fields or returns defaultValue if no field was found.

Namespace:  imbSCI.Core.extensions.data
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static string getProperString(
	this PropertyCollection source,
	string defaultValue,
	params Enum[] fields
)
Request Example View Source

Parameters

source
Type: System.DataPropertyCollection
The source.
defaultValue
Type: SystemString
The default value.
fields
Type: SystemEnum
The fields to test for proper value. Follows the given order

Return Value

Type: String
First proper value found or defaultValue if nothing found

Usage Note

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