<value>A null or zero length string does not represent a valid Type.</value>
</data>
<data name="Arg_TypeRefPrimitve" xml:space="preserve">
- <value>TypedReferences cannot be redefined as primitives.</value>
+ <value>TypedReferences cannot be redefined as primitives. Field name '{0}'.</value>
</data>
<data name="Arg_TypeUnloadedException" xml:space="preserve">
<value>Type had been unloaded.</value>
<value>The DaylightTransitionStart property must not equal the DaylightTransitionEnd property.</value>
</data>
<data name="Argument_TypedReferenceInvalidField" xml:space="preserve">
- <value>Field in TypedReferences cannot be static or init only.</value>
+ <value>Field '{0}' in TypedReferences cannot be static or init only.</value>
</data>
<data name="Argument_TypeIsWinRTType" xml:space="preserve">
<value>The type must not be a Windows Runtime type.</value>
if (flds == null)
throw new ArgumentNullException(nameof(flds));
if (flds.Length == 0)
- throw new ArgumentException(SR.Arg_ArrayZeroError);
+ throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds));
IntPtr[] fields = new IntPtr[flds.Length];
// For proper handling of Nullable<T> don't change GetType() to something like 'IsAssignableFrom'
throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo);
if (field.IsInitOnly || field.IsStatic)
- throw new ArgumentException(SR.Argument_TypedReferenceInvalidField);
+ throw new ArgumentException(SR.Format(SR.Argument_TypedReferenceInvalidField, field.Name));
if (targetType != field.GetDeclaringTypeInternal() && !targetType.IsSubclassOf(field.GetDeclaringTypeInternal()))
throw new MissingMemberException(SR.MissingMemberTypeRef);
RuntimeType fieldType = (RuntimeType)field.FieldType;
if (fieldType.IsPrimitive)
- throw new ArgumentException(SR.Arg_TypeRefPrimitve);
+ throw new ArgumentException(SR.Format(SR.Arg_TypeRefPrimitve, field.Name));
if (i < (flds.Length - 1) && !fieldType.IsValueType)
throw new MissingMemberException(SR.MissingMemberNestErr);