declare 4 bytes?
<p>How can I define 4 bytes and after that using them in a cycle with <code>if</code> or <code>for</code>?</p>

<pre><code>static int count = 0;

private void SetClock_Click(object sender, EventArgs e)
{
     count++;

     label5.Text = count.ToString("X2");
     txtSend.Text = "4D-" + "1A-" + "2B-" + "3C-" +
     (label5.Text.ToString());

     string[] allHexValues = txtSend.Text.Split(new char[] { '-' });
     int result = 0;
     foreach (string hexValue in allHexValues)
     {
        result = result ^ Convert.ToInt32(hexValue, 16);
     }
     // txtSend.Text = s;
     txtSend.Text = txtSend.Text + ("-") + result.ToString("X2");
</code></pre>

<p>You maybe know what it does. Now I want to change that code and set that <code>"1A-" + "2B-" + "3C-"</code> as a different bytes (they are 3 bytes + the <code>label5.Text</code> <code>byte = 4</code> bytes at all).</p>

<p>So now I want to define all different bytes and make a cycle saying:
If the 4th byte (<code>label5.text</code>) goes to <code>FF</code>(max for 1 byte), getting it to <code>00</code> and make the 3rd byte value <code>01</code> and start counting again on 4th byte <code>01</code> <code>02</code> <code>03</code> etc... again to <code>FF</code> and make it <code>00</code> and 3rd byte <code>02</code>... etc to 3rd byte <code>FF</code> and 2nd to <code>FF</code>, 1st to <code>FF</code> and when it come to <code>FF FF FF FF</code> cycle end say ... "error or something".</p>

<p>P.S: I need to keep the meaning of code.</p>
