14
開発者の自主性を優先してコーディングスタイルを推奨するべきですか、それとも一貫性を優先して推奨しないのですか?
開発者は、次のif/elseような1行のコードステートメントでブロックを記述します。 if (condition) // Do this one-line code else // Do this one-line code 別の方法では、すべてに中括弧を使用します。 if (condition) { // Do this one-line code } else { // Do this one-line code } 開発者は最初にオブジェクトをインスタンス化してから使用します。 HelperClass helper = new HelperClass(); helper.DoSomething(); 別の開発者は、オブジェクトを1行でインスタンス化して使用します。 new HelperClass().DoSomething(); 開発者は配列とforループを使用する方が簡単です: string[] ordinals = new string[] {'First', 'Second', …