C# Version 7.2
Released November, 2017
|C# 7.2 added several small language features:
fixedstatements with any type that supports a pattern.
|⮚Access fixed fields without pinning.
readonlystruct types, to indicate that a struct is immutable and should be passed as an
inparameter to its member methods.
inmodifier on parameters, to specify that an argument is passed by reference but not modified by the called method.
ref readonlymodifier on method returns, to indicate that a method returns its value by reference but doesn't allow writes to that object.
ref structtypes, to indicate that a struct type accesses managed memory directly and must always be stack allocated.
|⮚Use additional generic constraints.
|⮚Non-trailing named arguments
|⮚Named arguments can be followed by positional arguments.
|⮚Leading underscores in numeric literals
|⮚Numeric literals can now have leading underscores before any printed digits.
|⮚private protected access modifier
private protectedaccess modifier enables access for derived classes in the same assembly.
| ⮚The result of a conditional expression
(?:)can now be a reference.