Can you use hardy plank for fencing and if so how will it hold up in the rain?
Yes, and for a long time. Actually, hardy plank is a cellulose cement product so it is not affected by rain at all. It’s a little difficult to get paint to stick to it (water down your first coat). The fence itself would last in the rain indefinitely. If you paint it, the paint will last for about 15 years if it’s a good quality exterior paint. Where you will have problems is your fence posts which will probably be wood and won’t last as long as the planking.