Category: C#

Lambdas Expression for Getter-Only Auto-Properties in C# 6.0

C# 6.0 lets the developers use the lambda expression to implement the getter value of the read-only property . Whenever a lambda expression is found , the C# compiler identifies it as the property with only get method rather than a field. Lambdas Expression for Getter-Only Auto-Properties in C# 6.0 Below is a sample code snippet demonstrating the use of Lambdas Expression for Getter-Only Auto-Properties…

C# Compiler Warning – CS8371 field-targeted attributes on auto-proper

In this blog post, you’ll learn more about the C# Compiler Warning – CS8371 and the related message description C# Compiler Warning Code CS8371 C# Compiler Description for the Code :CS8371 Field-targeted attributes on auto-properties are not supported in language version {0}. Please use language version {1} or greater.