Posts

Showing posts with the label pattern matching in c# 7

Features in C# 7 - Pattern matching

Image
Hello Readers, In This blog post I have explained about two new features introduced with C# 7.0. (Along with other features like Tuples,local functions,ref return and ref local,throw expression, Deconstruction,Literal improvements,Generalized Async return types,More expression bodied members).   Pattern Matching   Out variable ( with enhancement)  Pattern Matching Patterns are already exists in the programming world.But C# has introduced for the first time in it's latest version 7.0( as of VS 2017). C# 7.0 version allows us to use a pattern in existing "is" statement and with "switch" statement and allows us to compare whether value has certain type or not. We can m...