Softwareserial

Hiya, after searching and searching Im trying to figure out how to add the proper code to turn a pin on or off. ideally i'd like to control a solenoid with the correct tag, but i am brand spanking new to arduino and coding and am facing a learning curve. What I'm trying to add is something like:

if(code == 0415ED297EE)
{ // if 10 digit code is round tag
digitalWrite(ledPin, HIGH);
delay(200)
digitalWrite(ledPin, LOW);
delay(1000)
}

Any advice or suggestions on where and how to insert this are welcome.

Thanks

Nate