Class DuplicateNotAllowedException
An exception thrown when an operation attempts to create a duplicate in a collection with set semantics (C5.IExtensible`1.AllowsDuplicates is false) or attempts to create a duplicate key in a dictionary.
With collections this can only happen with Insert operations on lists, since the Add operations will not try to create duplictes and either ignore the failure or report it in a bool return value.
With dictionaries this can happen with the C5.IDictionary`2.Add(`0,`1) metod.
Inheritance
System.Object
System.Exception
DuplicateNotAllowedException
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Message
System.Exception.Source
System.Exception.StackTrace
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Support.C5
Assembly: Lucene.Net.dll
Syntax
public class DuplicateNotAllowedException : Exception
Constructors
| Improve this Doc View SourceDuplicateNotAllowedException()
Create a simple exception with no further explanation.
Declaration
public DuplicateNotAllowedException()
DuplicateNotAllowedException(String)
Create the exception with an explanation of the reason.
Declaration
public DuplicateNotAllowedException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message |