All Questions
2
questions
4
votes
0
answers
2k
views
How do I deserialize a readonly struct with a constructor that takes a readonly struct as an in parameter?
I have a readonly struct (Outer) that has a readonly struct property (Inner) that is passed into the constructor as an in parameter to avoid one copy when the constructor is called. Trying to ...
14
votes
3
answers
3k
views
How to make readonly structs XML serializable?
I have an immutable struct with only one field:
struct MyStruct
{
private readonly double number;
public MyStruct(double number)
=> this.number = number;
}
And I want this to be ...