Made of wood presumably? Well, I don't see why not. With any timber construction I think the vulnerable places are at the ends of the main support timbers, so make sure they get covered.
When I replaced my fence posts I soaked the bottom few inches in oil before concreting in.