[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.CanInsert

CanInsert Method

CanInsert<T>(IDataCollection<T>, int, T)

Determines whether a new item can be inserted in the collection at the specified index.

Declaration
[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
Parameters
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.

Returns
Type Description
bool
Type Parameters
Name Description
T