[カナ変換]ひらがなをカタカナに
using System; using System.Linq; public static class Sample { public static string ToKatakana(this string s) { return new string(s.Select(c => (c >= 'ぁ' && c <= 'ゖ') ? (char)(c + 'ァ' - 'ぁ') : c).ToArray()); } }