What is your take on C# 9 Record Types? Will you use them? Why, or why not?
@parthlearning68093 жыл бұрын
Thank you for sharing this great knowledge
@ClaudioBernasconi3 жыл бұрын
Thank you. 🙂
@BijouBakson2 жыл бұрын
Thank you, that was useful.
@ClaudioBernasconi2 жыл бұрын
Thank you. 🙂
@BijouBakson2 жыл бұрын
@@ClaudioBernasconi I thank you even more for thanking me. Loop that :)
@user-xg7hi5mh3g2 жыл бұрын
If the data does not change, we don't need to synchronise the access to it ?
@msnotif2943 жыл бұрын
Hello. If I wanna to full clone a record. For example: var rec2=rec1 with { }; Is it the same as: var rec2=rec1; // is the 'with' necessary?
@ClaudioBernasconi3 жыл бұрын
I don't think it's necessary in this case. The with clause allows you to make a copy of the record by providing new values for selected properties.
@msnotif2943 жыл бұрын
@@ClaudioBernasconi Ok. Thank you
@ajeetmalviya62802 жыл бұрын
Which tool are you using to convert into IL?
@ClaudioBernasconi2 жыл бұрын
Sharplab io
@47Mortuus3 жыл бұрын
"var" is completely dead now (it has been before, too, because it is, by definition, less readable). instead of...: var person1 = new Person("John", "Adams"); write...: Person person1 = new("John", "Adams"); it is dead now, since the alternative is more readable (Datatype, variable name, assignment) and shorter than the var syntax. From now on, don't use a language feature unless you need it - so for var it would be limited to very few cases such as ArrayLists or whatever.
@jkf16m962 жыл бұрын
I don't get the statement "is completely dead now" Is it even discouraged or deprecated? Because I guess both options are compiled the same way, only 4 characters of difference (one space and "var") I think you're just exaggerating.