Partial class error with private sets #2245
Unanswered
ThermalMark
asked this question in
Q&A
Replies: 1 comment
-
|
Please apply this change to your code: [MessagePackObject(keyAsPropertyName: true, AllowPrivate = true)]
-public class LocationData
+public partial class LocationData
{
public List<double> xValues { get; private set; }
public List<double> yValues { get; private set; }
public List<double> zValues { get; private set; }
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry, I'm new to using MessagePack, so maybe this is obvious, but my searches haven't found anything.
Using AllowPrivate doesn't make any difference. When I have any class with private or internal set, VS reports that this is a partial class. It looks like that may work, but I want to make sure that's the right thing to do.
CS0260: Missing partial modifier on declaration of type; another partial declaration of this type exists
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions