Solved

Explain the bolded code

Posted on 2011-09-09
2
220 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 74

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now