Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Explain the bolded code

Posted on 2011-09-09
2
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 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