mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-14 10:20:40 +08:00
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:
@@ -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);
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user