Here is my code to create a definition text from 3 arguments. Is there any way to make it work with better performance and look nicer?

```
 private const string IllegalCharacters = "\\" + "\"" + "'#,.[]{}" + " ";

 public static string CreateDefText(string mainId, string     secondaryId,    string extraText)
    {
        var sb = new StringBuilder();
        sb.Append(mainId);
        if (sb.Length > 0 && !string.IsNullOrEmpty(secondaryId))
        {
            sb.Append("_");
        }
        sb.Append(secondaryId);
        sb.Append(extraText);
        if (sb.Length > 0 && (char.IsNumber(sb[0]) || '+'.Equals(sb[0]) || '-'.Equals(sb[0])))
        {
            sb.Insert(0, "N");
        }
        foreach (var illegalChar in IllegalCharacters)
        {
            sb.Replace(illegalChar.ToString(CultureInfo.InvariantCulture), string.Empty);
        }
        return sb.ToString();
    }

```