Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

C# How to return a List

$
0
0

  Hi the code below shown this method from another class in C#. May I know how do I return a List<string> to the other class so that the order class could access the data?

   public static string retrieveAllIP()
        {
            foreach(string s in addIP)
            {
                string returnIP = s;

                return returnIP;

            }
        }

Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>