Generate ToString method from public properties.