Default parameter specifiers are not permitted

后端 未结 4 1506
无人共我
无人共我 2020-12-10 05:35

I have the following code that gives the error

Default parameter specifiers are not permitted

How can this be fixed?

4条回答
  •  无人及你
    2020-12-10 06:21

    As per your error message, you can't do that in v3.5.

    The work around is multiple constructors:

    bool listUnsubscribe(string apikey, 
                         string id, 
                         string email_address) {
      return listUnsubscribe(apikey, id, email_address, false, true, true);
    }
    
    bool listUnsubscribe(string apikey, 
                         string id, 
                         string email_address, 
                         bool delete_menber,
                         bool send_goodbye,
                         bool send_notify) {
      return whatever;
    }
    

提交回复
热议问题