This rule flags the use of a Main method entry point in a project that could be converted to top-level statements instead. A candidate method must meet the following requirements:
Is static.
Is named Main.
Has a method body.
Has no type parameters.
Is contained in a type that's not public, doesn't derive from another type or implement an interface, isn't a nested type, and has no attributes or documentation comments.
Options
Options specify the behavior that you want the rule to enforce. For information about configuring options, see Option format.
Liity tapaamissarjaan ja luo skaalattavia tekoälyratkaisuja, jotka perustuvat reaalimaailman käyttötapauksiin muiden kehittäjien ja asiantuntijoiden kanssa.