Hi Ninja, Thanks for the comment. What you said makes a lot of sense to me: if you need to move data from one to another use a record. IMHO records could also become a bit of a pain, if not used correctly. Think about this:
record
public class Foo { public string S1 {get;set;} public string S2 {get;set;} } record Bar(int i1, Foo f);
I think records could be also really helpful to serialize and deserialize stuff (because it reduces the lines of code by a lot).
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Ninja,
Thanks for the comment. What you said makes a lot of sense to me: if you need to move data from one to another use a
record
.IMHO records could also become a bit of a pain, if not used correctly. Think about this:
I think records could be also really helpful to serialize and deserialize stuff (because it reduces the lines of code by a lot).