How can take value of length of pdu from label
<p>I'm sending SMS in PDU mode through flowing command. "length" is a label which shows pdu length. </p>

<p>My code is working when i write AT+CMGS=20 or whatever the length is but i want that code take value of label instead of writing static value in code, i'm using it below mention way but it is not working. </p>

<p>Can anyone help me about how can i write in code if i'm doing in wrong way?</p>

<pre><code>string recievedData = ExecCommand(port, "AT", 500000, "No phone connected");
recievedData = ExecCommand(port, "AT+CMGF=0", 500000, "Failed to set message format.");

string command = "AT+CMGS=\""+ length +" \"";
recievedData = ExecCommand(port, command, 500000, "Failed to accept phoneNo");
command = p1 + char.ConvertFromUtf32(26) + "\r";
recievedData = ExecCommand(port, command, 5000, "Failed to send message");
</code></pre>
