How to stop rider from moving events from top of class?
If I declare a event like below on top of my class
public event EventHandler OnSelectedUnitChanged;Then when I save the file the line is moved to middle of my file where functions are present.
private bool Update()
{
// Something
}
public event EventHandler OnSelectedUnitChanged;
private bool TryHandleUnitSelection()
{
// Someting
}I am unable to fine any formatting rule to fix this.
Please sign in to leave a comment.
Prakhars144, it sounds like your project might contain file layout rules described in Rearrange members with file and type layout patterns.
Could you check:
Check if Settings | Editor | Code Style | C# → File Layout contains any relevant rules. Note that, depending on your project type, you might need to switch between “General” C# rules and “Unity” rules by selecting the corresponding tab: