Click or drag to resize

collectionExtensionsmakeUniqueDictionaryName Method

imbSCI | imbACE | imbNLP | imbWEM | imbWBI
Makes a new Key for the dictionary by using proposal + _ count

Namespace:  imbSCI.Core.extensions.data
Assembly:  imbSCI.Core (in imbSCI.Core.dll) Version: 0.3.58.
Syntax
C#
public static string makeUniqueDictionaryName(
	this IDictionary dictionary,
	string proposal,
	ref int lastIteration,
	int iterationLimit = 10
)
Request Example View Source

Parameters

dictionary
Type: System.CollectionsIDictionary
The dictionary.
proposal
Type: SystemString
The proposal.
lastIteration
Type: SystemInt32
The last iteration.
iterationLimit (Optional)
Type: SystemInt32
The iteration limit - when to give up

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDictionary. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptioniterationLimit - Failed to make name from proposal [" + proposal + "] after [" + c.ToString() + "] iterations!
ExceptionFailed to make name from proposal [" + proposal + "] after [" + c.ToString() + "] iterations!
See Also