System.Xml.Serialization.CodeIdentifier.MakeValidInternal C# (CSharp) Method

MakeValidInternal() static private method

static private MakeValidInternal ( string identifier ) : string
identifier string
return string
        internal static string MakeValidInternal(string identifier)
        {
            if (identifier.Length > 30)
            {
                return "Item";
            }
            return MakeValid(identifier);
        }

Usage Example

Example #1
0
 private string GenerateVariableName(string prefix, string fullName)
 {
     this.nextReflectionVariableNumber++;
     return(string.Concat(new object[] { prefix, this.nextReflectionVariableNumber, "_", CodeIdentifier.MakeValidInternal(fullName.Replace('.', '_')) }));
 }