Exploring ‘With’ C# 10

C# 9 introduced us to record and the associated with operator. The with operator helped us to create or clone copies of existing record instances with set of changes specified. In C# 10, the C# team has taken the concepts a little further. Let us first examine what we could do in C# 9. public record Person { public string FirstName … Continue reading Exploring ‘With’ C# 10

Evil Code #008: Property Instance

It has been long since I blogged on Evil Code series. Time to check one again now. Consider two samples of code. Sample 1 Sample 2 How differently would two of the code samples given below behave ? Well, Sample 1 compiles and Sample 2 doesn't. Why ?? Sample 2, in fact raises following error. … Continue reading Evil Code #008: Property Instance