I am starting to learn C#. I want to know how to put a value outside of a `for` loop like this:

```
int firstByte;
if (bytes == 1)
{                          
    for (int j = 0; j < bytes; j++)
    {
        firstByte = comBuffer[j];
        if (firstByte == 0x06)
        {
            checkStatus = 2;
        }
   }
}

```

`bytes` is the length of `comBuffer`, and `comBuffer`'s value is `[0x01,0x06]`. Is that a way to put the `if(firstbyte == 0x06)` outside of the `for` loop?. I want to put it outside of the `for` loop because I want add another `if-else` using `if(firstbyte)` outside of the loop.

My expectation is some like this:

```
int firstByte;
if (bytes == 1)
{                          
    for (int j = 0; j < bytes; j++)
    {
        firstByte = comBuffer[j];
        if (firstByte == 0x06)
        {
            checkStatus = 2;
        }
   }
}

if(firstByte == 0x06)
{ 
   string status = "OK";
}

```

When i try it, the program shows a warning message `"unasigned value ....."`.
Any solution or suggestion?