C # Overriding and access modifier Keyword Preferred order

Which ordering is preferable for the keyword overrideand access method ( public, privateetc.) for the methods? It seems that both are as follows:

    public override string ToString ()
    {
        return "access modifier first";
    }

 

    override public string ToString ()
    {
        return "override keyword first";
    }

In Java, the order of execution of keywords is usually applied, so this flexibility seems amazing. Obviously, this flexibility is also present in Java ( static public void main (String [] args)works ...).

+3
source share
4 answers

ReSharper, VS, , , . , # , .

, ReSharper "", IntelliSense . , , , .

+3

, public override string ToString() .

0

, override . , Visual Studio public override, , .

0

Actually no difference. Typically, an access modifier is defined as the very first keyword in a function definition. In VS, he usually reorders your keywords for you.

0
source

All Articles