public class Solution { public bool DetectCapitalUse(string word) { var length = word.Length; ) { ; ; bool firstCapital = false; bool firstTime = true; foreach (var c in word) { if (char.IsUpper(c)) { UpCaseCount++; if (firstTime) { firstCapital = tr…