You explained all of these new patterns so well; I went from no knowledge of them to feeling like I could put them into my code in under 20 mins. Love the format of the videos :)
All of these videos of new features of C# 9.0 are extremely well executed. They are short, informative and simple with great examples. It would be great to also have these from C# 8.0 which is also "relatively" new.
I just found this channel, and I am very glad that I did! Your description is very clear and the examples you use make it even easier to understand. Keep up the good work!
Great video. I'm happy about the patterns and the functional direction of C#. I would love to see discriminated unions come to C# 10...oh and keep the patterns coming too :-)
Thanks for the video, a really useful overview of the types of pattern matching now available in C# 9.0. I really dislike the way the Positional pattern matching has been implemented because it requires me to go and examine the deconstructor for the object type, I'm not sure how this makes the code more readable.
The pattern syntax in this example if anything is less readable. It appears way more messy and for people unfamiliar with patterns would just be confusing.
Thank you for making this video! Can I ask you a question? In this code *if(n is 1 or 2 || true)* I was fully expecting to be able to use *or* instead of || but it throws an error. Does that mean that to add a 2nd condition we still need to use the logical operators || && ? Thanks!
Good explanation :) still it's not possible to write something like with rust or F# : match x { 1 => println!("one"), 2 => println!("two"), 3 => println!("three"), _ => println!("anything"), }
The only problem I have with this is that you can not test against variables, which you have to do 95% of the time. Using hard coded values is usually a big no-no in practice.
Big thanks for easy explanation. What this code name? i know this is not method decloration, but what is the name of this code? anonym variable? or what? var (Name2, Rank2) = GetOfficer(); // what is this part name? : var (Name2, Rank2) and this. I understand this is method, but without name..? can u explain what is this?: (int Something, string Another) Whatever((int Neat, bool Cool) data) { return (data.Neat, data.Cool.ToString()); }
Thanks! The first one, that is known as a tuple. In your second example, you return a tuple with two fields (values): one integer named Something and one string named Another. The method accepts a named tuple which you call data, this tuple has two fields (values). The method then returns a new tuple which is constructed using the values from what you passed to the method. I hope this helps!
I sometimes feel sorry for the language team. They worked really hard on such great features and we consumers out there on the internet are only debating about stuff like: var x = new T() vs T x = new()....
My pattern matching has detected you changed your profession. At the beginning you are a public speaker but at the end you are an author. Very suspicious.
Varför uttalar du som svensk ditt namn på det sättet? Ekberg. Eckbörg? Ett namn är ett namn och uttalas bara på ett sätt. Nu skall jag kolla resten av videon, som jag faktiskt tror är av bra kvalitet, ämnet är av stort intresse.
You explained all of these new patterns so well; I went from no knowledge of them to feeling like I could put them into my code in under 20 mins. Love the format of the videos :)
Thank you so much for the kind words! That makes me extremely happy to hear :)
This is the best video I've seen about pattern matching! And I think it is the most complete video about it! Very good explanations!
Thank you, it is the best tutorial i found for Pattern Matching with C#.
Thank you for this- great insight into Pattern matching, a foundation for my AI!
Thanks for watching!
Great explanation , great content. Love to listen to your teachings.
I really like the format of these videos! Great explanation :)
That makes me very happy to hear. Thank you very much!
Great Video. Thank you for posting.
this work is underrated. thanks for doing this and looking forward to more csharp related content
Thanks so much for the nice comment!
I really like the way you present information. It's so simple to get it!
Hey man! Thank you for your lectures, they are awesome, clear and concise. Came to your channel from your Pluralsight "Command Pattern" xD
Thank you so much for those kind words! I am happy you like it :)
All of these videos of new features of C# 9.0 are extremely well executed.
They are short, informative and simple with great examples.
It would be great to also have these from C# 8.0 which is also "relatively" new.
I just found this channel, and I am very glad that I did! Your description is very clear and the examples you use make it even easier to understand. Keep up the good work!
Thank you so much 🙏
I get excited about new language features too!
Glad I'm not the only one!
Great video. I'm happy about the patterns and the functional direction of C#. I would love to see discriminated unions come to C# 10...oh and keep the patterns coming too :-)
Thank you very much!
You and me both. It's really exciting times for C#. What more patterns would you like to see?
Thanks for the video, a really useful overview of the types of pattern matching now available in C# 9.0. I really dislike the way the Positional pattern matching has been implemented because it requires me to go and examine the deconstructor for the object type, I'm not sure how this makes the code more readable.
Pattern matching in C# is now better supported than in F#.
The pattern syntax in this example if anything is less readable. It appears way more messy and for people unfamiliar with patterns would just be confusing.
Clear explanation. I have one small question. Can we define the .NET5 like this? .NET5 is the combination of .NET core and .NET Framework
Thank you for making this video! Can I ask you a question?
In this code *if(n is 1 or 2 || true)* I was fully expecting to be able to use *or* instead of || but it throws an error. Does that mean that to add a 2nd condition we still need to use the logical operators || && ?
Thanks!
don't like to add new keywords if you can wo them. instead of init you can write readonly set, instead of record you can write imho const class
I don't think they are keywords in sense like foreach or while are. They are more positional so you can still use the name as variable names.
Good explanation :) still it's not possible to write something like with rust or F# :
match x {
1 => println!("one"),
2 => println!("two"),
3 => println!("three"),
_ => println!("anything"),
}
The only problem I have with this is that you can not test against variables, which you have to do 95% of the time. Using hard coded values is usually a big no-no in practice.
Big thanks for easy explanation. What this code name? i know this is not method decloration, but what is the name of this code? anonym variable? or what?
var (Name2, Rank2) = GetOfficer(); // what is this part name? : var (Name2, Rank2)
and this. I understand this is method, but without name..? can u explain what is this?:
(int Something, string Another) Whatever((int Neat, bool Cool) data)
{
return (data.Neat, data.Cool.ToString());
}
Thanks!
The first one, that is known as a tuple.
In your second example, you return a tuple with two fields (values): one integer named Something and one string named Another. The method accepts a named tuple which you call data, this tuple has two fields (values). The method then returns a new tuple which is constructed using the values from what you passed to the method.
I hope this helps!
@@FilipEkberg big thanks, and sorry for my bad english
I sometimes feel sorry for the language team. They worked really hard on such great features and we consumers out there on the internet are only debating about stuff like: var x = new T() vs T x = new()....
They do an amazing job!
My pattern matching has detected you changed your profession. At the beginning you are a public speaker but at the end you are an author. Very suspicious.
I guess a lot can happen in 16 minutes and 40 seconds :)
"Improvements"
Don't like them?
I think all of this is not really that important actually it's complicating the code and making it unreadable
Varför uttalar du som svensk ditt namn på det sättet? Ekberg. Eckbörg? Ett namn är ett namn och uttalas bara på ett sätt.
Nu skall jag kolla resten av videon, som jag faktiskt tror är av bra kvalitet, ämnet är av stort intresse.
Alltid gjort och kommer alltid göra.
Jag anser att ett namn kan uttalas hur som helst, spelar ingen roll.
@@FilipEkberg Tack för svar. Jag tycker det känns konstigt bara. Men respekt för bra kontent skall du ha i alla fall!! 👍
@@BristlyBright Tack så mycket! Kul att du gillar de :)