Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialized CultureInfo throws NullReferenceException when accessing properties #101

Open
jarlrasm opened this issue Aug 3, 2018 · 0 comments

Comments

@jarlrasm
Copy link

jarlrasm commented Aug 3, 2018

CultureInfo implementation of property-getters uses a private field that is null after deserializing, creating exceptions when accessing any property.

Test to confirm issue(put in CustomObjectTests.cs):

[Fact]
public void CanSerializeCultureInfo()
{
  var expected = CultureInfo.CurrentCulture;
  Serialize(expected);
  Reset();
  var actual = Deserialize<CultureInfo>();
  Assert.Equal(expected, actual);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant