Rep. Ryan Costello said on CNBC, "I'm beside myself," because he said he was supposed to be at a congressional baseball practice where a gunman opened fire on Wednesday morning.

Costello said on "Squawk Box," shortly after the shooting, he would have been "in the line of fire" because he plays shortstop.

Among the wounded was House Majority Whip Steve Scalise, who plays second base. Scalise was shot but reported to be in stable condition. Since he's in the congressional leadership, Scalise's security detail was at the field in Alexandria, Virginia, just outside of Washington. The shooter has been taken into custody.

Costello, a Pennsylvania Republican, said he doesn't have a car in D.C., and was supposed to get a ride to the practice. He said he arrived one minute late, at 6:01 a.m. ET, and his ride left.

Had Scalise not been there, no security would have been at the field, Costello said, adding the Wednesday morning practice was the last before a charity baseball event scheduled for Thursday.

More coverage of the shooting