System.Linq.Expressions.Error.TypeMustNotBePointer C# (CSharp) Метод

TypeMustNotBePointer() статический приватный Метод

ArgumentException with message like "Type must not be a pointer type"
static private TypeMustNotBePointer ( string paramName ) : Exception
paramName string
Результат Exception
        internal static Exception TypeMustNotBePointer(string paramName)
        {
            return new ArgumentException(Strings.TypeMustNotBePointer, paramName);
        }

Usage Example

Пример #1
0
        private static void ValidateGoto(LabelTarget target, ref Expression value, string targetParameter, string valueParameter, Type type)
        {
            ContractUtils.RequiresNotNull(target, targetParameter);
            if (value == null)
            {
                if (target.Type != typeof(void))
                {
                    throw Error.LabelMustBeVoidOrHaveExpression(nameof(target));
                }

                if (type != null)
                {
                    TypeUtils.ValidateType(type, nameof(type));
                    if (type.IsByRef)
                    {
                        throw Error.TypeMustNotBeByRef(nameof(type));
                    }

                    if (type.IsPointer)
                    {
                        throw Error.TypeMustNotBePointer(nameof(type));
                    }
                }
            }
            else
            {
                ValidateGotoType(target.Type, ref value, valueParameter);
            }
        }
All Usage Examples Of System.Linq.Expressions.Error::TypeMustNotBePointer
Error