how to call an If statement only once in C#

101

how to call an If statement only once in C# -

boolean firstRow = true;

while{row = result.next())
{
    if(firstRow)
    {
        firstRow = false;
        //do some setup 
    }

    //do stuff
}

Comments

Submit
0 Comments