Copy Phone Number

Copy Phone Number

Hi,

How do I copy a phone number from one field to another given a specific scenario? I use single line for both fields. Please advise. Thanks.

if (Home_Phone != null && Preferred_Phone == Null)
{
input.Preferred_Phone = input.Home_Phone;
}