Been using CR for a while now, and have it set up good for formatting the code, I work with a lot of legacy code and often format them as most of them are really a mess to look at. I have noticed this small formatting issue
Create a C# Class with the following:
C#namespace MyNameSpace
{
[Serializable()]
public class BaseEntity
{
[field: NonSerialized]
public event EventHandler ValueChanged;
[XmlIgnore]
public virtual bool MonitorDirty { get; set; }
protected virtual void OnValueChanged() => ValueChanged?.Invoke(this, new EventArgs());
}
}
Now, when I do a code cleanup I get the following:
C#namespace MyNameSpace
{
[Serializable()]
public class BaseEntity
{
[field: NonSerialized] // <<-- THIS SHOULD NOT BE LEFT ALIGNED WITH NAMESPACE
public event EventHandler ValueChanged;
[XmlIgnore]
public virtual bool MonitorDirty { get; set; }
protected virtual void OnValueChanged() => ValueChanged?.Invoke(this, new EventArgs());
}
}
Basically after formatting / cleaning the attribute with the work "field: " in it if left aligned with the namespace, when it should remain above the "public" word just like the XmlIgnore attribute. Is it a bug or am I missing a setting for this?
Cheers.
Hello,
Thank you for bringing our attention to this issue. We reproduced it and will fix it soon.
WOW, that was quick, Great work. Thanks. :)
You are welcome. We will notify you once a fix is ready.