textBox内的判断,会的请指教
请教~我想在一个textBox内输入16个字符或8个汉字的时候自动换行只允许输入20行.当点保存时.保存到一个txt文本内谁能教下代码 
 textBox1.MaxLength   =   320; 
                                     int   a   =   16; 
                                     if   (textBox1.TextLength   ==   a) 
                                     { 
                                                 textBox1.AppendText( "\n "); 
                                     } 
                                     else 
                                     {                                                   
                                     } 
 我在TEXT内写的代码只循环了一次.FOR循环的时候不能使用它的最大数做为参数来判断.哪位大哥帮下忙
------解决方案--------------------int a = 16; 
 textBox1.MaxLength = 320; 
 if(textBox1.MaxLength> =textBox1.TextLength ) 
 { 
             if (textBox1.TextLength % a == 0) 
             { 
                 textBox1.AppendText( "\n "); 
             } 
             else 
             {                   
             } 
 } 
 这样不就行了 
 取余来判断不就行了