# バグを見つけろ:.NET > コードは1つ。バグを見つけるか、バグがないことを示してください。 デイリーチャレンジ: 2026-08-19 (UTC) · Senior ```csharp using System.Collections.Generic; public class RequestCounter { private readonly Dictionary _counts = new(); private readonly object _lock = new(); public void Increment(string endpoint) { lock (_lock) { if (!_counts.ContainsKey(endpoint)) _counts[endpoint] = 0; _counts[endpoint]++; } } public int GetCount(string endpoint) { return _counts.TryGetValue(endpoint, out var count) ? count : 0; } } ``` ## あなたの判断 - セキュリティ上の欠陥 - ロジックのバグ - コードスタイル - 問題なし 1日1回まで。回答するとすぐに正解が表示されます。 --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ja/daily/dotnet