private Exception CreateInvalidPrimitiveTypeException(Type type) { return new InvalidDataContractException(SR.Format( type.IsInterface ? SR.InterfaceTypeCannotBeCreated : SR.InvalidPrimitiveType, DataContract.GetClrTypeFullName(type))); }