/// <summary> 
        /// 문자열 길이 체크 
        /// </summary> 
        private void CheckStringLength() 
        { 
            string value = this.MessageMessageBox.Text; 
            char[] C = value.ToCharArray(); 
            double TotalLength = 0; 
            for (int i = 0; i < C.Length; i++) 
            { 
                TotalLength += (Char.GetUnicodeCategory(C[i]).ToString() == "OtherLetter") ? 2 : 1; 
                } 
            if (TotalLength > 80) 
            { 
                this.MessageMessageBox.Text = this.MessageMessageBox.Text.Substring(0, this.MessageMessageBox.Text.Length - 1); 
                return; 
            } 
                this.TxtLimit.Text = string.Format("{0} / 80", TotalLength.ToString());

+ Recent posts