[]
Determines whether a new item can be inserted in the collection at the specified index.
[UnconditionalSuppressMessage("Trimming", "IL2075", Justification = "The members of ISupportEditing<> class were explicitly annotated so this method can use them safely.")]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, typeof(ISupportEditing<>))]
public static bool CanInsert<T>(this IDataCollection<T> dataCollection, int index, T item) where T : class?
<UnconditionalSuppressMessage("Trimming", "IL2075", Justification:="The members of ISupportEditing<> class were explicitly annotated so this method can use them safely.")>
<DynamicDependency(DynamicallyAccessedMemberTypes.PublicMethods, GetType(ISupportEditing(Of )))>
Public Shared Function CanInsert(Of T As Class)(dataCollection As IDataCollection(Of T), index As Integer, item As T) As Boolean
| Type | Name | Description |
|---|---|---|
| IDataCollection<T> | dataCollection | The data collection. |
| int | index | The index where the items would be inserted. |
| T | item | The item that would be inserted. |
| Type | Description |
|---|---|
| bool |
| Name | Description |
|---|---|
| T |