示例#1
0
        public static (bool exists, CharNames charName) GetByName(string word)
        {
            CharNames charName = All.SingleOrDefault(x => x.Words.Any(w => w.EqualsIns(word)));

            return(charName != null, charName);
        }
示例#2
0
 public static bool TryGetByName(string word, out CharNames charName)
 {
     charName = All.SingleOrDefault(x => x.Words.Any(w => w.EqualsIns(word)));
     return(charName != null);
 }