StyleCop and = space

I am launching StyleCop (which, by the way, is completely recommended 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 reports an error

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

If this is unacceptable, what is valid?

+3
source share
2 answers

C'mon;) Matt said this in a comment.

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

Make life easy for yourself and just CTRL + K + D file in VS.

+4
source

Source: https://habr.com/ru/post/1713095/


All Articles