Search code examples
stylecop

StyleCop and = space


I am running StyleCop (which btw I completely recommend if you want to deliver high quality code)...

I have this line

[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable=false)]

update tried this too

[System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] 

StyleCop is reporting an error

Warning 2   SA1003: The spacing around the symbol '=' is invalid.

If this is invalid, what is valid?


Solution

  • Come on y'all. ;) Matt had it in the comment.

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]