C# Compiler should give warning but doesn’t?
In this case the compiler detects that s is written but not read, and deliberately suppresses the warning. The reason is because C# is a garbage-collected language, believe it or not. How do you figure that? Well, consider the following. You have a program which calls a method DoIt() that returns a string. You do … Read more