Solved

Explain the bolded code

Posted on 2011-09-09
2
228 Views
Last Modified: 2012-05-12
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?
0
Comment
Question by:vincentvanhst
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 36511506
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.
0
 

Author Closing Comment

by:vincentvanhst
ID: 36513426
Thanks buddy, I understand now with your detailed description :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question