string context = ""; int length = System.Text.Encoding.Default.GetByteCount(context); length为输入内容context的字节数(数字,英文是1 ;中文是2)