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

GetElementType() public static method

public static GetElementType ( System.TypeSpec t ) : System.TypeSpec
t System.TypeSpec
return System.TypeSpec
	public static TypeSpec GetElementType (TypeSpec t)
	{
		return ((ElementTypeSpec)t).Element;
	}

Usage Example

Example #1
0
        public void SymbolRelatedToPreviousError(Type type)
        {
            if (reporting_disabled > 0 || !printer.HasRelatedSymbolSupport)
            {
                return;
            }

            type = TypeManager.DropGenericTypeArguments(type);

            if (TypeManager.IsGenericParameter(type))
            {
                TypeParameter tp = TypeManager.LookupTypeParameter(type);
                if (tp != null)
                {
                    SymbolRelatedToPreviousError(tp.Location, "");
                    return;
                }
            }

            if (type is TypeBuilder)
            {
                DeclSpace temp_ds = TypeManager.LookupDeclSpace(type);
                SymbolRelatedToPreviousError(temp_ds.Location, TypeManager.CSharpName(type));
            }
            else if (TypeManager.HasElementType(type))
            {
                SymbolRelatedToPreviousError(TypeManager.GetElementType(type));
            }
            else
            {
                SymbolRelatedToPreviousError(type.Assembly.Location, TypeManager.CSharpName(type));
            }
        }
All Usage Examples Of Mono.CSharp.TypeManager::GetElementType