What is appropriate?

I am wondering.. so at what point is male-female interaction inappropriate?

between male-female colleagues

between male-female friends

in private/company..?