Explain the bolded code

namespace CommaValues
    class Program
[b]        private static List<Dictionary<string, string>> GetData(
   out List<string> columns)[/b]

Open in new window

Can someone clarify exactly what the bolded code does?
Who is Participating?
käµfm³d 👽Connect With a Mentor Commented:
The function GetData returns a List of Dictionaries, where the key and value of each Dictionary are of type string. This function also has an out parameter, which also acts kind of like a return value--it's a parameter returned by reference. An out parameter can be either unitilialized or initialized before being passed to the function, but it is expected to be assigned to before the function returns. There is also the ref keyword which functions similarly to out, except that the parameter is expected to be initialized prior to passed to the function.
vincentvanhstAuthor Commented:
Thanks buddy, I understand now with your detailed description :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.