Get Russian Char Type - CSharp System

CSharp examples for System:Char

Description

Get Russian Char Type

Demo Code


using System.Text;
using System;/*ww  w  .  j av  a 2 s .  co m*/

public class Main{
        public static CharType GetRussianCharType(this char c)
        {
            if (c >= 0x0410 && c <= 0x042F)
            {
                return CharType.Upper;
            }
            if (c >= 0x0430 && c <= 0x044F)
            {
                return CharType.Lower;
            }
            if (c == 0x1025)
            {
                return CharType.Upper;
            }
            if (c == 0x1105)
            {
                return CharType.Lower;
            }
            return CharType.None;
        }
}

Related Tutorials