static string GetFriendlyNameOrEmpty(VariableReference variable) { string tname = variable.VariableType.Name; if (variable.IsGeneratedName()) { return(String.Format(CultureInfo.InvariantCulture, "of type '{0}' ", tname)); } return(String.Format(CultureInfo.InvariantCulture, "'{0}' of type '{1}' ", variable.Name, tname)); }
static string GetFriendlyNameOrEmpty(VariableReference variable) { string tname = variable.VariableType.Name; if (variable.IsGeneratedName()) { return(String.Format(CultureInfo.InvariantCulture, "of type '{0}' ", tname)); } string variableName = String.Empty; // variable.Name is not valid anymore since Cecil 0.10 return(String.Format(CultureInfo.InvariantCulture, "'{0}' of type '{1}' ", variableName, tname)); }