Converts a method to a property.