V5 vision sensor if and else statement

how do I use vision sensors in an if and else statement on vex pro.
examples would be nice…

By “vex pro” do you mean PROS V5 (the software developed by Purdue students) or VEXcode Pro?

Both PROS V5 and VEXcode Pro have extensive documentation on the vision sensor, here are some useful links:

PROS V5 Vision Sensor API Documentation
VEXcode Vision Sensor Example (block code, can’t find any written examples)