The F# types they are based on are immutable. In F# this is by design as it fits with the functional programming paradigm. In C# and VB and other imperative languages, this seems like an arbitrary restriction.
I think anonymous types use a compiler determined variable. This variable is not known until the code is compiled so how can you access it? If you can't access it, you can't change it, thereby making anonymous types read-only.
Comment removed
CrazyHorseInvincible 2 years ago
WTH is with the read-only ppts in C#? Are they just being cruel for cruelties sake or is there some weird reasoning behind that.
mindprism 2 years ago
ppts?
davidmbush 2 years ago
Yes, sorry, Properties.
Enjoy your videos.
mindprism 2 years ago
Nothing wrong with read only properties in C#
davidmbush 2 years ago
No, I mean why are they read only for anonymous types? Is there a reason for that?
mindprism 2 years ago
Oh, right.
No idea.
davidmbush 2 years ago
The F# types they are based on are immutable. In F# this is by design as it fits with the functional programming paradigm. In C# and VB and other imperative languages, this seems like an arbitrary restriction.
CrazyHorseInvincible 2 years ago
I think anonymous types use a compiler determined variable. This variable is not known until the code is compiled so how can you access it? If you can't access it, you can't change it, thereby making anonymous types read-only.
1129Irving 2 years ago
Thank you for this tutorial. Great lesson.
fridrikur 3 years ago
sweet.........im in hurricanne Fay AS I WATCH YOUR VID and im alucky one to with power in Florida
devon2576 3 years ago
Oh no, curly braces in Visual Basic!
robrobbins 4 years ago 4
lol
AllRoundMangaFan 3 years ago