I have two projects in my solution:
- The API: https://github.com/foxip/mollie-api-csharp
- The project where Iretrieve and send data from and to my API
I want to fill a ComboBox with methods
but when i try to do it how they say I should, it doesn't work. This is what I tried:
using Mollie.Api;
// ...
MollieClient mollieClient = new MollieClient();
mollieClient.setApiKey("test_1234");
Method methods = new Method();
methods = Mollie.Api.Method.all();
Under all there is a red line saying:
Error 1 'Mollie.Api.Method' does not contain a definition for 'all'
When I write Mollie.Api.Method.*
, the helper gives me then all the possible methods at *, but how can I get them automatically into my ComboBox?
EDIT: this works for me:
cboMethod.DataSource = Enum.GetNames(typeof(Method));