You are developing a C# application that includes a class named Product. The following code
segment defines the Product class:
You implement System.ComponentModel.DataAnnotations.IValidateableObject interface to provide
a way to validate the Product object.
The Product object has the following requirements:
The Id property must have a value greater than zero.
The Name property must have a value other than empty or null.
You need to validate the Product object. Which code segment should you use?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
B
The IEnumerable and IEnumerator interface in .NET helps you to implement the iterator pattern, which enables you to access all elements in a collection without caring about how it’s exactly implemented. You can find these interfaces in the System.Collection and System.Collections. Generic namespaces
https://msdn.microsoft.com/en-us/library/dd411880(v=vs.110).aspx
This would be the right link:
https://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.ivalidatableobject.validate(v=vs.110).aspx
http://stackoverflow.com/questions/3400542/how-do-i-use-ivalidatableobject
IValidatableObject has a single method Validate(ValidationContext)
Determines whether the specified object is valid.