Informational observations

There are some messages that the C# compiler could give that really wouldn't fall into the warning or error camp.  These would fall into the category of more informational, like "hey did you know that..." and would refer to issues that you could choose to address or not with no ill affects.  A warning would be something like:

public class Class {

    private int property;

    public int Property {

        get {

            return Property;




"Hey! Returning the containing property could potentially lead to an infinite recursion at runtime".


public class Class {

    int value;

    public Class(int value) {

        value = value;



"Hey! Assigning a value into itself has no affect."

These are warnings on perfectly legal code but in most cases it's probably not what you wanted to do and usually indicates an error.  So while the message might be spam, it seems a reasonable tradeoff to give it to you.

An informational message is more like:

using System.Collections;
public class Class {}

"The 'using System.Collections;' state was unncessary and can be removed".

I see this sort of message as different than before because it's not really telling you of a potential problem in your code.  (Unless you expected that System.Collections was going to be used and now you're shocked that it wasn't).   It's also not really a risky thing to tell the user.  If you remove the "using" and then attempt to use a type from that namespace (like IList) we'll then give you the smart tag immediately to add it in, so it's not going to be really annoying to be adding/removing namespaces all the time.

Would these kind of messages be appreciated?  If so, would there be others that you'd find useful?  Tiny little notes that aren't necessary but would help you out with commong coding scenarios, etc.