What are some ways to prevent myself from getting sick when I have been around someone with a virus?

A couple people in my family are sick and I really can't catch it...how can I help protect myself? I know taking vitamin C is good but what else? Thank you :)
What are some ways to prevent myself from getting sick when I have been around someone with a virus?
Post Opinion