VCCodeElements::CreateUniqueID Method (String^, String^)
Creates a programmatic identifier that does not collide with other identifiers in the scope, and follows the current language naming rules. This method is not implemented in Visual C#.
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Parameters
- Prefix
-
Type:
System::String^
Required. The prefix string or whole name to check to see whether or not it is unique for the collection of code elements.
- NewName
-
Type:
System::String^
Optional. If supplied, this returns with a guaranteed unique name.
CreateUniqueID returns whether Prefix is a unique identifier in the collection of code elements. If the second argument, NewName, is supplied, then it returns a unique name based on Prefix as a prefix (possibly the same characters with no additional characters). The return value, however, always returns whether Prefix is unique, regardless of whether the second argument is supplied.