Reformat the C# codes.

Disable creating new line before open brace.
This commit is contained in:
krahets
2023-04-23 03:03:12 +08:00
parent ac6eece4f3
commit 73dcb4cea9
49 changed files with 561 additions and 1135 deletions
@@ -8,11 +8,9 @@ using NUnit.Framework;
namespace hello_algo.chapter_array_and_linkedlist;
public class list
{
public class list {
[Test]
public void Test()
{
public void Test() {
/* 初始化列表 */
int[] numbers = new int[] { 1, 3, 2, 5, 4 };
@@ -49,15 +47,13 @@ public class list
/* 通过索引遍历列表 */
int count = 0;
for (int i = 0; i < list.Count(); i++)
{
for (int i = 0; i < list.Count(); i++) {
count++;
}
/* 直接遍历列表元素 */
count = 0;
foreach (int n in list)
{
foreach (int n in list) {
count++;
}