Can you connect a toggle switch to an arduino ?

Hi, Can you connect a toggle switch to an arduino and read its state?

toggle switch:
http://www.ebay.com/itm/10pcs-12V-20A-Red-LED-Light-Rocker-Toggle-Switch-SPST-ON-OFF-Car-Truck-Boat-ATV-/172256224460?hash=item281b4564cc:g:C8MAAOSw-KFXchSs&vxp=mtr

i need to read if the toggle switch is up or down for different modes of my robot, example, if the switch us up, it will be in mode A. if the switch is flipped down, it will go to mode B

Yes, connect it like any other switch.

Read this:
http://www.gammon.com.au/forum/?id=11955

.