fix(csharp): reformat csharp codes and docs (#652)

* fix(csharp): reformat the C# codes and docs

* Update time_complexity.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
hpstory
2023-07-24 19:50:00 +08:00
committed by GitHub
parent 1777a16865
commit 978d3c2ed7
13 changed files with 47 additions and 77 deletions

View File

@@ -368,18 +368,15 @@
```csharp title="hash_map.cs"
/* 遍历哈希表 */
// 遍历键值对 Key->Value
foreach (var kv in map)
{
foreach (var kv in map) {
Console.WriteLine(kv.Key + " -> " + kv.Value);
}
// 单独遍历键 key
foreach (int key in map.Keys)
{
foreach (int key in map.Keys) {
Console.WriteLine(key);
}
// 单独遍历值 value
foreach (String val in map.Values)
{
foreach (String val in map.Values) {
Console.WriteLine(val);
}
```