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

HasElementType() public static method

This method is not implemented by MS runtime for dynamic types
public static HasElementType ( System.TypeSpec t ) : bool
t System.TypeSpec
return bool
	public static bool HasElementType (TypeSpec t)
	{
		return t is ElementTypeSpec;
	}

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::HasElementType