Return list C# API

Hi guys,
i would like to have a list of ip by API.
I run this code:

mikrotik.Send("/ip/firewall/address-list/print where list~\"listName\"", true);
foreach (string h in mikrotik.Read())
{
	Console.WriteLine(h);
}

but i face only this :!done
List isn’t blank, so what’s wrong? can someone help me?

API supports query words to filter. ~ is not a valid query operator. But if listName is exact, you can use the following code:


mikrotik.Send("/ip/firewall/address-list/print");
mikrotik.Send("?list=listName", true);

foreach (string h in mikrotik.Read())
{
  Console.WriteLine(h);
}

https://wiki.mikrotik.com/wiki/Manual:API#Queries

Thanks, finally it working !!!