Mono.CSharp.TypeManager.CSharpName C# (CSharp) Method

CSharpName() static public method

static public CSharpName ( IList types ) : string
types IList
return string
	static public string CSharpName (IList<TypeSpec> types)
	{
		if (types.Count == 0)
			return string.Empty;

		StringBuilder sb = new StringBuilder ();
		for (int i = 0; i < types.Count; ++i) {
			if (i > 0)
				sb.Append (",");

			sb.Append (CSharpName (types [i]));
		}
		return sb.ToString ();
	}

Same methods

TypeManager::CSharpName ( System.TypeSpec t ) : string

Usage Example

Example #1
0
 public override void Error_ValueCannotBeConverted(EmitContext ec, Location loc, Type t, bool expl)
 {
     if (TypeManager.IsGenericParameter(t))
     {
         Report.Error(403, loc,
                      "Cannot convert null to the type parameter `{0}' because it could be a value " +
                      "type. Consider using `default ({0})' instead", t.Name);
     }
     else
     {
         Report.Error(37, loc, "Cannot convert null to `{0}' because it is a value type",
                      TypeManager.CSharpName(t));
     }
 }
All Usage Examples Of Mono.CSharp.TypeManager::CSharpName