ValidationResultsCollectionTryGetFirstWithHighestSeverity Method

Gets the first ValidationResult with highest severity, optionally using the specified propertyName, or , if no such ValidationResult exists.

Definition

Namespace: KGySoft.ComponentModel
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public ValidationResult? TryGetFirstWithHighestSeverity(
	string? propertyName = null
)

Parameters

propertyName  String  (Optional)
An optional property name to get the result for a specific property, or to get the highest severity ValidationResult for any property.

Return Value

ValidationResult
The first ValidationResult with highest severity using the specified propertyName, or , if no such ValidationResult exists.

See Also