Table of Contents

Class ModelErrorCollection

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

A collection of ModelError instances.

public class ModelErrorCollection : Collection<ModelError>, IList<ModelError>, ICollection<ModelError>, IList, ICollection, IReadOnlyList<ModelError>, IReadOnlyCollection<ModelError>, IEnumerable<ModelError>, IEnumerable
Inheritance
ModelErrorCollection
Implements
Inherited Members

Constructors

ModelErrorCollection()

Initializes a new instance of the ModelErrorCollection class.

public ModelErrorCollection()

Methods

Add(Exception)

Adds the specified Exception object to the model-error collection.

public void Add(Exception exception)

Parameters

exception Exception

The exception.

Add(string)

Adds the specified error message to the model-error collection.

public void Add(string errorMessage)

Parameters

errorMessage string

The error message.