Help me for this

Can you give me a real time example of Lists & Dictionary in c# ??

Think of the List as an array and the Dictionary as a hash table. You would only use the Dictionary if you needed to map (or associate) meaningful keys to values, whereas a List only
maps (or associates) positions (or indices) to values.
For example, say you wanted to store an association between a person's age and their height. You could use a Dictionary<int, int> to map the person's age (an int) to their height (an int):
Dictionary<int, int> personHeightMap = new Dictionary<int, int>();
personHeightMap.Add(21, 185);
personHeightMap.Add(31, 174);
int height = personHeightMap.ContainsKey(21) ? personHeightMap[21] : -1;
Not a very useful example, but the point is you wouldn't be able to do this as elegantly with a List because it would need to store these values positionally.
Also refer: C# Dictionary Versus List
Rachit
Please mark as answer or vote as helpful if my reply does

Similar Messages

  • Hp pavilion dv6 6180 help me for this error when I am using my recovery disk

    hp pavilion dv6 6180 help me for this error when I am using my recovery disk
    The destination drive is not connected

    Hello Mohammadshamlou.  I understand that you're having some issues using your Recovery Disc.  It is giving you the error that the drive is not connected.  Is this correct?  How long have you had the notebook?
    What issue originally led you to want to try a recovery?
    The error seems to imply that it is not detecting the hard drive as this would be the most logical destination drive.  So, I feel the best thing to try first is verify that the hard drive is in proper working order.  Follow these steps and please post the result. 
    Please click the white star under my name to give me Kudos as a way to say "Thanks!"
    Click the "Accept as Solution" button if I resolve your issue.

  • When i update my IOS7 i lost my all pic from my IPAD2 how to get back those pic? and i don,t think so i did kept back up before i did that. can anyone help me for this issue?

    When i update my IOS7 i lost my all pic from my IPAD2 can anyone suggest how to get back those pic? and i don,t think so i did kept back up before i update ios7. can anyone help me for this issue?

    The photo's in your camera roll would be in a backup, if you have one (iCloud or iTunes).  If you did not keep a backup somewhere, they are gone.  Sorry, but that is the way of any data - if you don't have a backup of it somewhere, there is nothing to restore it from.
    All other photo's should be on your computer somewhere anyway - whereever you had them to sync to the device originally.

  • I am constantly getting hte "connection has been reset" message. I followed instructions in the help section for this & now it's worse. I am using 6.0. Please help!

    I cannot do anything online because I constantly get the "connection has been reset" message. This has never happened before. I followed instructions on Firefox help page for this message and it only made it worse!

    Firefox 2.0.0.20 is the last ever version of Firefox for Win98 / SE / ME.
    You can get it from here, but you are better off using K-Meleon (derived from Firefox) or Opera instead an old version of Firefox:
    [ftp://ftp.mozilla.org/pub/firefox/releases/2.0.0.20/win32/en-US/]
    You can try KernelEx to get Firefox 3+ to work, but it would be very slow with an old PC of less than 750Mhz. 3.5 and later supposedly doesn't work.
    http://sourceforge.net/projects/kernelex/

  • Time manageru2019s workplace -No possible entries help available for this time

    Hello Experts,
    I am configuring time manageru2019s workplace.
    I can insert an employee , I can see his detail, planed schedule of time, but I cant change its TIME ID it is showing there like ?03 ( No possible entries help available for this time data ID )
    I have configured Time IDs also accordingly.
    I used definition set SET_BE
    And subsets P,Q,R
    I created time data IDs A- Absence ,B- Avilability ,U-Leave
    Please let me know where I am going wrong.
    Thanks and Regards
    Jaydeep Jadhav

    Hi,<br>
    Recheck all the nodes under TM->TMW. If you have maintained groups , please check them.
    Also request the abaper to debug and find which query is failing.
    Good luck<br><br>
    Thanks,
    Amosha
    <br><br>"Known is a drop & unknown is an OCEAN!"

  • Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite ph

    Hi ...Some days ago i bought a used iphone 4s....but i can't activate the phone...when i connect it to itunes it shown that activate the phone but the person was not give me the ID & password....pls help me for this issue....Iphone is my favourite phone...in my child hood i love Apple products & till now......I can't activate it & for this reason i can't find the carrier network & can't make any call....pls help me...thanks for always support..My device ios is 7.1.2
    & IMEI is : *****
    Br-----------------------
    Fazlur
    <Personal Information Edited By Host>

    It's a security risk to post your IMEI number and I've asked the Hosts to remove it.
    If a second-hand iOS device has been 'Activation locked' then only the previous owner can unlock it, either by providing you with the account ID and password, or by removing it from his list of devices (as he should have done before selling it) - please see http://support.apple.com/kb/ts4515
    If you are unable to contact him to do this then I'm afraid you will not be able to use the device - there is no other way of unlocking it at all. Apple cannot unlock it for you.
    You should if possible return it to wherever you bought it and ask for a refund as in this event the device is completely useless.

  • I unable to see my network messages after upgrading to ios6 on my iphone4,can anyone help me for this issue?

    I unable to see my network messages after upgrading to ios6 on my iphone4,can anyone help me for this issue?

    Try to perform SMC and PRAM resets:
    http://support.apple.com/kb/HT3964
    http://support.apple.com/kb/ht1379
    Then try a safe boot:
    http://support.apple.com/kb/HT1564
    Ciao.

  • IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error

    IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error,

    spacepilot wrote:
    i live in the WS10 / 0121 area and have been having similar problems. i have an up to 20mb services, but up to a month ago connected at 4800, then my line went dead for 6 days, and all indis could do was send me  new router, which came the day after my line was restored, but had dropped to 2418 and remained so for the past 3 to 4 weeks, then i dropped to 1963 yesterday, and 729 today.
    all speeds are far lower on my upto 20mb than they where on my upto 8mb link.
    foegot to add, i reported the problem via the report a problem link, which hopefully will be red by someone with  a firmer grasp of english that the normal call centre staff
    welcome to the forum    why don't you start your own subject and post the adsl stats from your router and also run btspeedtester and post the results and someone may be able to offer assistance
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Firefox 3.6.15 not play youtube videos show blank video frame but other browsers play perfectly please help me for this matter i have already updated adobe flash player.

    Firefox 3.6.15 not play youtube videos show blank video frame but other browsers play perfectly please help me for this matter i have already updated adobe flash player.

    Answers in this forum have shown different things have worked for different people.
    For some clearing YouTube cookies and the cache solved the problem. For details of how to do that see https://support.mozilla.com/kb/Deleting+cookies and https://support.mozilla.com/kb/How+to+clear+the+cache
    Others had to go a step further after deleting YouTube cookies and block YouTube from saving cookies. In the Tools menu select Options to open the Options window. Go to the Privacy panel and make sure it is set to "Use custom setting for history". Click the Exceptions button, type in http://www.youtube.com and click on Block
    Another option is to disable hardware acceleration for Flash. To do that right-click on a Flash video, select Settings, go to the first tab of the settings for the option to enable/disable hardware acceleration for Flash. This is something recommended by YouTube for those having problems - http://www.google.com/support/youtube/bin/answer.py?&answer=1209379

  • I'm unable to play game in hp 15-r009TU.. what can i do for this. please help me for this

    i'm unable to play game in hp 15-r009TU.. what can i do for this. please help me for this

    Hi Madhuama, I'll try to give you a hand with this. First off, what OS is running on your notebook, what game are you attempting to play, and how is it not working? Is it not installing?
    Thanks,
    Fenian Frank
    I work on behalf of HP

  • Plzzz help me for this report,its emergency.....

    hey guys/guls...I have to develop a Repair Bill report,At the end(bottom) of this report I've to show the calculations n values like Paid amount,previous balance,Grand net & net balance, I'M doing this by enlarging(lengthening)the master record much more below the detail record(while detail record's repeating frame remains inside master's repeating frame),it gives the proper look for report with fewer(1 or 2 detail records as I wanna have,but when I run this report with a greater number of detail records like 5 or 6 it pushes the bottom values(prev.bal,g.net etc)to next page while there remains a big gap in between detail recors n bottom values,so plzzz tell me some solution for this as quickly as possible for u.

    dear brother,its just a usual report just like a standard bill report, what I wanna do is to print the cash values almost 3inches above the bottom of page just like a common bill is used in market, for this I increased the length of master record's(based on master table) repeating frame n dragged the cash values(stored in master table)upto the bottom of this frame,so I think these values r coming in the push path of the detail records coz cash values move to next page if the number of detail records increases even if alot of blank space between last detail record n cash values, I've already tried the technique i.e fixing the vertical length of master or detail repeating frame but it didn't work, so plzzz tell me something else, if u may wish tell me urs email I'll send u that rdf file n sql for the based tables,thanx

  • Firefox cannot load pages that other browsers can, but the 'help' page for this issue did not fix the problem.

    I am troubleshooting an issue occurring on a family member's pc. Immediately after changing their "search" settings from "Yahoo search" to "Google search", they found that Firefox was unable to load any webpages. After troubleshooting the problem, I found the "Firefox can't load websites but other browsers can" help page, and attempted each of the solutions listed. None of those solutions fixed the issue. Also, I uninstalled and re-installed Firefox; the issue persists. However, the 'new' version of Firefox remembered the tabs left open when the 'old' version was deleted, so some temporary files likely persisted.
    Are there any other steps that can be taken, or is Firefox on this computer no longer an option?

    Start with this;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''Network.'''
    Look for '''Configure How Firefox Connects''' and press the '''Settings''' button.
    Check the settings.
    Some problems occurs when your Internet security program was set
    to trust the previous version of Firefox, but no longer recognizes your
    updated version as trusted. Now how to fix the problem: To allow
    Firefox to connect to the Internet again;
    * Make sure your Internet security software is up-to-date (i.e. you are running the latest version).
    * Remove Firefox from your program's list of trusted or recognized programs. For detailed instructions, see
    '''[https://support.mozilla.org/en-US/kb/configure-firewalls-so-firefox-can-access-internet Configure firewalls so that Firefox can access the Internet.]''' {web link}
    If there is still a problem, go to that computer and do this;
    Type '''about:support''' in the address bar and press '''Enter.'''
    Under the main banner, press the button; '''Copy Text To Clipboard.'''.
    Then in the reply box at the bottom of this page,
    do a right click in the box and select '''Paste.'''
    This will show us your system details.
    '''No Personal Information Is Collected.'''

  • Any help/solution for this please??

    You'll need to subscribe to watch this channel.
    I see it looks like a lot of people may be having this issue, i now cannot view any of the BT Sports channels beit in HD or normal.
    Black screen telling me i have to subscribe.
    Went on live chat 87 in the queue, by the time i got down to number 1 (30plus minutes) it said there was no available advisors.
    I was also on the phone the same length of time, only for it to go dead, this has happened 3 times whilst trying to phone BT.
    Any help please, thanks

    I can view it all via the apps and the online player, just not via my BT Vision box.

  • HT5622 this apple id has not yet been used with the itunes store that is the thing always appear every time i want to download. not worth working for my 3gs!! hope you help me for this!! thanksss..

    how is this guysss???
    can you help me i cant download any apps.

    Hi ...
    Try here >  Using an existing Apple ID with the iTunes Store and Mac App Store
    If you see, "None" in the Edit Payment Information window, select that.

  • What's query or function will help me for this issus please ?

    Hi
    I attached here jpg which will show you there 3 table A , b And c
    And i needed know how i can make Function or any thing else for know which i add into cell question mark
    Pls look into this attached and advise me
    Take your time
    http://imageshack.us/f/853/examplees.jpg/
    Edited by: 964035 on Oct 9, 2012 1:09 AM
    Edited by: 964035 on Oct 9, 2012 2:26 AM

    Below the cods for create the table and insert some data as example
    I needed know how i can Booking The item from stock for each order and how i can know the status of item it's will be available or not so we should do the order purchase for item
    Create Table Color (                                   
         Order Number(5) Not Null ,                              
         Color Varchar2(8) Not Null ,                              
         Qty Number (8) Not Null )                              
    Create Table Recipe (                                   
         Color Varchar2(8) Not Null ,                              
         Item Varchar2(8) Not Null ,                              
         Recipe Number (8) Not Null )                              
    Create Table Stock (                                   
         Item Varchar2(8) Not Null Constraint Item_PK PRIMARY KEY,               
         Qty_Of_Stock Number (8) Not Null )               
    Insert into Color VALUES ( 1500 ,     Red'     ,10);
    Insert into Color VALUES ( 1500 ,     yellow'     ,15);
    Insert into Color VALUES ( 1500 ,     Green'     ,8);
    Insert into Color VALUES ( 1500 ,     Blue'     ,7);
    Insert into Color VALUES ( 1600 ,     yellow'     ,6);
    Insert into Color VALUES ( 1600 ,     Green'     ,7);
    Insert into Color VALUES ( 1600 ,     Blue'     ,8);
    Insert into Color VALUES ( 1700 ,     Red'     ,10);
    Insert into Color VALUES ( 1700 ,     Blue'     ,15);
    Insert into Color VALUES ( 1800 ,     Green'     ,16);
    Insert into Color VALUES ( 1800 ,     yellow'     ,9);
    Insert into Recipe VALUES ( 'Red','A',0.25);
    Insert into Recipe VALUES ( 'Red','B',0.3);
    Insert into Recipe VALUES ( 'Red','C',0.2);
    Insert into Recipe VALUES ( 'Red','D',0.25);
    Insert into Recipe VALUES ( 'Yellow','C',0.1);
    Insert into Recipe VALUES ( 'Yellow','D',0.3);
    Insert into Recipe VALUES ( 'Yellow','E',0.2);
    Insert into Recipe VALUES ( 'Yellow','F',0.4);
    Insert into Recipe VALUES ( 'Green','C',0.25);
    Insert into Recipe VALUES ( 'Green','D',0.35);
    Insert into Recipe VALUES ( 'Green','E',0.2);
    Insert into Recipe VALUES ( 'Green','G','0.1);
    Insert into Recipe VALUES ( 'Green','H',0.1);
    Insert into Recipe VALUES ( 'Blue','A',0.35);
    Insert into Recipe VALUES ( 'Blue','B',0.35);
    Insert into Recipe VALUES ( 'Blue','C',0.3);
    Insert into Stock VALUES ( 'A',50);               
    Insert into Stock VALUES ( 'B',60);               
    Insert into Stock VALUES ( 'C',40);               
    Insert into Stock VALUES ( 'D',30);               
    Insert into Stock VALUES ( 'E',20);               
    Insert into Stock VALUES ( 'F',10);               
    Insert into Stock VALUES ( 'H',25);               
    Insert into Stock VALUES ( 'G',15);               
    Take your time my dear ...

Maybe you are looking for

  • Special characters in Fireworks 8

    In Fireworks MX, I can type special characters via Alt+nnnn. I can input a large portion of the full Unicode range this way, including General Puncuation (8192-8303) and Geometric Shapes (9632-9727). In Fireworks 8, the Alt method only seems to work

  • Capturing JPanel graphics

    I am trying to capture the graphics of a JPanel and write it to JPEG. I have had success when I add the JPanel to a JFrame, create a BufferedImage, get a Graphics object from the BufferedImage, and then call the JPanel's paint/print. However, when th

  • Phone will not backup in order to perform iOS 5 update

    I have been trying dice 1pm EST today to update my iPhone and it will not complete backup. It started once and set for over an hour and then just stopped and it has currently been on the " backing up iPhone" screen for almost 2 hours and it's not eve

  • Curve fitting only part of a waveform

    I am taking some data from an Oscilloscope and I need to do a curve fit.  As you can see from the data in the attachment the data begins at 0 and ends a 10e-6.  I just want to curve fit the part from 5e-6 to 10e-6.   This is what I have tried 1) I ta

  • Block Multiple Instance Of Form

    Hai all, In forms 6i, can we block the opening of a single form in multiple instances in the same application? Regards, Manu