Version

Item Property (DataValidationRuleCollection)

Gets or sets the references which have the data validation rule applied to it.
Syntax
public WorksheetReferenceCollection this[ 
   DataValidationRule rule
]; {get; set;}

Parameters

rule
A data validation rule.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when the rule is null.
System.Collections.Generic.KeyNotFoundExceptionOccurs when the property is retrieved and the rule is not applied to the Worksheet.
System.ArgumentException Occurs when the property is set and the value is from a Worksheet other than this collection.
System.ArgumentExceptionOccurs when the property is set and the rule is invalid based on its rule type's requirements.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also