UtilityEx.GetUnusedBlockName<T> Method
Public Shared Function GetUnusedBlockName(Of _
T As {Block, IKeyedCollectionDisposableItem(Of T)})( _
ByVal name As String, _
ByVal blocks As BlockKeyedCollection(Of T), _
Optional ByVal addCounterOnlyIfNeeded As Boolean = false _
) As String
This language is not supported or no code example is available.
Type Parameters
- T
The Block item belong to the collection.
Parameters
- name
- string
The original name to start from.
- blocks
- BlockKeyedCollection<T>
The blocks collection.
- addCounterOnlyIfNeeded
- bool
When true, the original name is preserved if not used yet, otherwise, the new name counter starts from 1 searching for a non duplicated name.
Return Value
stringThe name that can be used to create a new block not already contained in the blocks collection.