Skip to content

Question: why List<int> property causes error: object containing type(s) must be partial? #428

Description

@feeleen
using System;
using System.Collections.Generic;
using MemoryPack;

public class Program
{
	public static void Main()
	{
		var person = new Person();
		var bin = MemoryPackSerializer.Serialize(person);
	}

	[MemoryPackable]
	public partial class Person
	{
		public  List<int> IntItems { get; set; }
		public List<string> StringItems { get; set; }
	}
}

error MEMPACK042: The MemoryPackable object 'Person' containing type(s) must be partial

the docs says int, string, List<> are supported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions