IF your question is correctly worded, which I am not too sure about, AND length is actually a label an not some other variable, then you would need to change
string command = "AT+CMGS=\""+ length +" \"";
to
string command = "AT+CMGS=\""+ length.Text +" \"";