Can anybody tell me How to store and return List of Strings.
I am asked this Because i have written a function which returns Collection of strings and I want to prepare a COM for that one and need to consume that COM(to get the returned list ) in VC++ where I can extend some functionality using that list of strings. I hope this would be clear.
List<string> or string[] are the best options.
Here is a sample method that returns list of strings :
public static List<string> GetCities()
{
List<string> cities = new List<string>();
cities.Add("Istanbul");
cities.Add("Athens");
cities.Add("Sofia");
return cities;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With