Generates a unique valid identifier name for a data member of the specified type.
[Visual Basic] Overloads Function GenerateUniqueDataMemberName( _ ByVal memberType As ICodeClass, _ ByVal exceptions() As String _ ) As String [C#] string GenerateUniqueDataMemberName( ICodeClass memberType, string[] exceptions ); [C++] String* GenerateUniqueDataMemberName( ICodeClass* memberType, String* exceptions[] ) = 0; [JScript] function GenerateUniqueDataMemberName( memberType : ICodeClass, exceptions : String[] ) : String;
The purpose of this is to allow designers to create names of instance variables that won't conflict with existing members. It is most common for the language service to return a name of the form "className[N]" where [N] is a number starting at 1. For example "button1", "button2", etc..
The exceptions parameter allows the caller to supply a set of names to be excluded when searching for a unique data member name. This is useful if the caller already has a set of names that the source file does not know about.
ICodeSourceFile Interface | ICodeSourceFile Members | System.ComponentModel.Design.CodeModel Namespace | ICodeSourceFile.GenerateUniqueDataMemberName Overload List