Help C# Hi, i have studying for 3 weeks and i need some help. How can i sort case 2 and display that with dinamic array?

  //Meny
            Console.WriteLine("\n HÄNGA GUBBE\n");
            Console.WriteLine(" 1) Lägg till ord");
            Console.WriteLine(" 2) Lista alla ord");
            Console.WriteLine(" 3) Spela");
            Console.WriteLine(" 4) Avsluta");
            int valet;
            Console.Write("\n\tVälj 1-4:  ");
            valet = int.Parse(Console.ReadLine());
            switch (valet)
                case 1:
                    Console.WriteLine("\n lägg ett till ord! ");
                    break;
                case 2:
                    Console.WriteLine("\n Lista med alla ord :\n");
      char[] array = { 'lev', 'skratta', 'gledje', 'gråt', 'njut'};  
            Array.Sort<char>(array);
            foreach (var c in array)
                Console.WriteLine(c);
            Console.WriteLine("\n");
                    //List<string> list = new List<string>();
                    //Random r = new Random();
                    break;
                case 3:
                    string guesses, bokstäver;
                    Console.Write("\n Hur många fel får man ha? ");
                    guesses = (Console.ReadLine());
                    Console.WriteLine(" Utmärkt, då spelar vi!\n");
                    Console.WriteLine(" Felgisningar :" + "0/" + guesses);
                    Console.Write(" Gissade bokstavär: \n" );
                    bokstäver = (Console.ReadLine());
                    Console.WriteLine("Aktuel ord");
                    Console.WriteLine("Gissa bokstav : "+bokstäver+" \n");
                    break;
                case 4:
                    Console.WriteLine("\n  HEJ DÅ! \n");
                    Console.Beep();
                    break;
                //avbryter while loopen, avslutar spelet

You can do it like this;
var text = Console.ReadLine();
if(array.Contains(text)) // if exists do what ever you want
Please mark it correct if you find the answer helpful and please start  a new thread if you have another question. Thanks.

Similar Messages

  • My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphon

    My iPhone's screen black, it does not work and I tied to hold press power and home press but it did not work? By the way for seconds I saw iTunes cabal  simple, but unfortunately, I do not have backup for my iPhone in my mac, so how can I restore my iphone without loss my date?
    Thanks

    lbryan1987 wrote:
    I dont want the button problem solved i need to know how to restore the phone without using that button or going into settings
    You don't in the condition it's in. You will either have to get the phone replaced by Apple or pay a 3rd party to repair it.
    there seriously should be more than two ways to solve this other wise apple is useless and we will never buy another apple product.
    Seriously? It's physically broken!

  • Help my i pod is disabled it says try in 21 million min how can i sort it out

    help my i pod is disabled it says try in 21 million min how can i sort it out

    Connect the iPod to its syncing computer and restore via iTunes.  If iTunes asks for the passcode and you can't enter the passcode or you do not have the syncing computer, place the iPod in recovery mode and then restore.  For recovery mode see:
    iPhone and iPod touch: Unable to update or restore

  • Hi.I have an iPhone 6,64 with part number LLA and it needs to repair.How can I repair it in Malaysia.

    Hi.I have an iPhone 6,64 with part number LLA and it needs to repair.How can I repair it in Malaysia.

    The phone can only be serviced in the country where it was originally sold.
    If the phone came from the US, then you must physically take it to the US or send it to someone you know there to take it in for service.

  • I have a 7D but the serial stiker its gone and i need the SN how can i get it (i dont have the box)

    i have a 7D but the serial stiker its gone and i need the SN how can i get it (i dont have the box) is there a way to find it on the camera menu?
    Solved!
    Go to Solution.

    The serial number is in the EXIF.  Any EXIF reader will display it.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 8.7, Lightroom 5.7

  • Storage:  I got a 32gig iPad for Christmas - I really need some help.

    Storage:  I got a 32gig iPad for Christmas, and literally I am already down to 2 gigs of storage left.  I believe my iPad is a 4th generation, and currently on my device I only have a 10 apps, 6 photos, 3 personal family videos 10mins in length each, and about 10 disney channel tv shows for my kids.  I also have my work email, but I set it to only go back two weeks. 
    I am not sure what I am doing to eat through this much space so quickly.  I realized after downloading 4 tv shows for my daughter I was getting HD, so I did change the other 6 to SD which I know takes less space.  However it hasn't really helped.  Recently I started using the camera to take a few short movies of my kids 3 videos about ten mins in length each and that ate through space in no time.
    My iPad is 32gigs but really only started with 28 gigs capacity. 
    Is there something I can do?  Am I doing something wrong?  Sorry I am not the most technically inclined, but a co-worker of mine has an older iPad with thousands of pics, hundreds of songs, plenty of movies, at least 20 apps, etc and her 32 gig iPad still has 12 gigs left.  She has WAY more stuff on hers than mine.
    I really appreciate any help someone can provide.  Thank You.  

    Ok. Do you know if I delete a show from iTunes on my device can I still redownload it for free?  Seems that 13.7 gigs taken up are those disney channel shows.  If I delete them I can always just redownload them no? 
    I appreciate your help.  Thanks.

  • Hello I have a few questions and I need some help with my iTunes and  iPod

    Hello iTunes people.
    I have a little problem with my iTunes. I actually almost know nothing about iTunes really. But I have had a 80 gig ipod .. ummm I think it's a iPod classic maybe. A long time ago I just downloaded iTunes. I think one of my tech friends already had put the program onto my PC so I did not even have to download it. Anyways I put my life's collection of mp3's onto iTunes and then syncs it with my iPod and it worked great. Here is my problem. I just recently bought a MONSTER PC. I have lovingly named it " ED209 " I downloaded iTunes for it and I have the most up to date version.8.1.1 is the most current version correct? Ok well here is my problem. What I want to do is I want to put everything that is currently on my iPod ONTO the iTunes library. I DO NOT want to import anything from the library or playlist or whatever you call it ONTO the iPod because there is nothing in the library. Now this is were its gets weird and possibly silly. A person I was chatting with on Facebook sort of made fun of me because she was like " Dude! Just push " Sync " But the reason I am paranoid is because THIS is the message I get....
    " The iPod " Aaron's iPod " is synced with another iTunes library. Do you want to erase this ipod and sync with this iTunes library? "
    HOLY COW!! That girl on Facebook was making fun of me but READ THAT. That exactly says ERASE the "iPod" and Sync with THIS library " It does not say put what is ON the iPod into THIS Library. It says it the other way around. Clear as day it says it will ERASE the " Ipod " it does not say " Fill the library with whats on your iPod "
    Do I all of a sudden not understand English or something???? I know how to freaking read and from what it says is sounds a 100 percent like " we will ERASE youe iPod and put everything from this playist or library onto your iPiod" But there is NOTHING in my library? Am I mentally challenged or what?
    I hope someone can help me here and I have another request. Could someone just tell me all the cool things I can do with iTunes and my iPod? I am trying to read the help files and the FAQ and whatever else Apple provides you with but it has SO MUCH crap that looks usless. I find myself reading a whole paragraph about some simple little section of s section of a section of a feature! Know what I mean. Someone give me the long and short of the neat things I can do with this stuff. I have windows Vista with a wicked computer that has like 6 gigs of ram and m iPod is a 80 GB Classic
    help !!
    PROTEUS

    *What I want to do is I want to put everything that is currently on my iPod ONTO the iTunes library.*
    1). Connect your iPod to your computer. When you get the message that it is linked to a different library and asking if you want to link to this one and replace all your songs etc, press "Cancel". Pressing "Erase and Sync" will irretrievably remove all the songs from your iPod.
    2). When your iPod appears in the iTunes source list change the update setting to manual, that will let you continue to use your iPod without the risk of accidentally erasing it. Check the "manually manage music and videos" box in Summary then press the Apply button. Also when using most of the utilities listed below your iPod needs to be enabled for disc use, changing to manual update will do this by default: Managing content manually on iPod and iPhone
    3). Once you are connected and your iPod is safely in manual mode there are a few things you can do to restore your iTunes from the iPod. iTunes will only let you copy your purchases directly from an iPod to the computer, you'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    For everything else (music from CDs, other downloads and including iTunes purchases) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. You can read reviews and comparisons of some of them here:
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    A selection of iPod to iTunes utilities:
    TuneJack Windows Only (iPhone and iPod Touch compatible)
    SharePod Windows Only (iPhone and iPod Touch compatible)
    iPod2PC Windows Only
    iDump Windows Only
    YamiPod Mac and Windows
    iPod Music Liberator Mac & Windows
    Floola Mac & Windows
    iPodRip Mac & Windows (iPhone and iPod Touch compatible)
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
    4). Whichever of these retrieval methods you choose, keep your iPod in manual mode until you have reloaded your iTunes and you are happy with your playlists etc then it will be safe to return it auto-sync.
    5). I would also advise that you get yourself an external hard drive and back your stuff up, relying on an iPod as your sole backup is not a good idea and external drives are comparatively inexpensive these days, you can get loads of storage for a reasonable outlay: Back up your iTunes library by copying to an external hard drive

  • HT201269 my I-touch could not be restored. I had purchased Songs from the I-tune store but now don't have access to them. I purchased them. How can I retrieve them and put them on my new I=touch?? Any help with that will be greatly appreciated.

    My I-touch could NOT be restored. I had purchased songs from the I-tune store and they were on the "old" i-touch. I cannot access the tunes from the "old" device. How can I get "retrieve" the songs I purchased and put them on my NEW I-touch?? Please help!
    I could purchase the songs again. But I really don't want to spend more money. Help?

    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I recently got an iPhone 5 and I need some help...

    Ive noticed on my siblings iPods, that it has the option of having my phone number as a way to send messages to their devices. Since those are not my devices, how can I have it that my number wont show up on their devices? My problem is, in their settings, in their iMessages, it has the option for them to use the number for my iPhone. How can I fix this? It doesnt happen with the other iPhone numbers in my house and its making me a little paranoid. Any help?

    Dominator
    A couple of questiosn that will help the community..
    1.  Are they on the same Apple Id as you?
    2.  Do they have their own cell fon numbers?
    3.  Are they iPods or iPads.. just double checking
    4.  Are the  iPods/Ipads wifi only devices?
    cheers

  • New Mac User and I need some help please!

    Hello, I just bought a MacBook, and it was an open box item that didn't come with any manuals or restore discs. I'd like to get a copy of restore discs to re-format everything since the computer was a display. Does anybody know how to go about getting them? I know the discs are very specific to what model MacBook you have. Thanks in advance for your help...

    The manuals you can get online but the restore disks you will need to call the store. If that fails call apple support and tell them what has happened and they will advise you on what to do. If this fails you could by a copy of lepard and you can reformat the HD and reinstall lepard.

  • How can i sort a hashmap so that it can have duplicates

    i need to sort a hashmap so that it can have duplicates.

    How would you obtain the correct value, though? Suppose I add the values "fido", "rover", "mandibles", "fluffy" against the key "dog": How would you retrieve "fido"?
    This goes against the grain of what a Map is for, what are you actually trying to do?

  • Midi novice - frustrated, and really need some help!

    Hi there,
    I'm really frustrated, because I want simplicity and I'm finding that it's taking a very long time to learn all the ins and outs of using Logic.  I have spent hours every weekend trying to learn how to use it. 
    What I want to do, but can't seem to figure out how, is connect my Kawai MP5 (digital stage piano) via USB, and actually use the internal sounds of my piano within Logic.  Is there a way to do this using the external instrument within Logic?  Or is there another way?  I realize I could probably connect it using an audio interface and an audio cable from the piano directly into my macbook, but at this time I don't have an interface.  Could somebody just tell me if there is a way to use the internal sounds of my piano within Logic via a USB connection?  How to set it up? AND, how to actually hear my piano coming through the speakers once it is connected?
    I'd appreciate whatever assistance I can get with this.
    Thanks!

    MIDI - musical instrument digital interface, and I'm confused because USB is another way to transmit midi data (see wikipedia article which states, " In the years since, MIDI over USB is increasingly common on musical instruments. As other interfaces that used to be used for MIDI (serial, joystick, etc.) disappeared from personal computers, USB became the common interface for connecting MIDI devices."
    AND, according to the documentation included with Logic Pro 9 it does appear that this is something I can do.
    External Instrument
    You can use the External Instrument to route external MIDI sound generators through the Mixer, which you can then process with effects.
    You can also use the External Instrument to transmit and receive MIDI information through the instrument channel strip that it is inserted in. This enables you to control an external module—both MIDI and audio—from within one element."
    I'm just not sure how to set it up, and get it working.

  • I'm not that good with computers and I need some help....

    I downloaded Adobe Reader 9.3.3 for windows 7 so I could print out sheet music (pdf file). When I try to open it using Adobe Reader, this pops up:
    "This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association for this program in the Default Programs control panel"
    and I need to know what to do, to fix it. It might be a small problem, but I have no idea what to do. so could someone tell me in detail, how I'm supposed to fix this?                                                                     thanks,

    Felix2000 wrote:
     Actually, when I open Adobe Reader (just by itself) the same message appears, and if I close the pop-up, adobe reader closes.
    That is very unusual - it appears that the Reader is not installed correctly.  Can you open Control Panel, then Add/Remove Programs, and uninstall Adobe Reader.  Then reinstall it from http://ardownload.adobe.com/pub/adobe/reader/win/9.x/9.3.3/enu/AdbeRdr933_en_US.exe

  • I have all my music on a external HD. How can I run iTunes on my laptop with out my EHD connected? when I open iTunes I get: Afolder containing "iTunes Library" cannot be found, and is required. Please chose or create a new iTunes library.

    It also tells me Choose iTunes Library
    iTunes needs a library to continue, you may choose an existing library or create a new one.
    I have all my music on an external hard drive (ehd) but would like to run itunes with out conecting my ehd. How can i do this? I'm

    You need the entire libary on the external, not just media.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391
    iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847
    Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/message/13025536 and https://discussions.apple.com/message/17457605
    Once you get a complete iTunes folder on the external drive, start iTunes with the option/alt key held down and select the iTunes Library.itl file on the external drive.  You will also need to do this with your main computer or the libraries will become unsynchronized.
    Alternatively you can make a separate library using the same media on the second computer. Start as you have been doing, let iTunes create a new, blank library file which will be on hte internal drive, set the media folder location in preferences to be the one on the external drive, then add the files to the new iTunes library. Unless you are a super-organized individual, or you don't care if your libraries do not have the same content, you are better off using a single library file that is on the external, not setting up separate library files.

  • HT204053 Guys im selecting my apple id to icloud and they told me u have to create a new one ....how can i use the same apple that i need...and also software up to date

    Help plz

    ALL purchases are permanently associated with whatever Apple ID was used to originally obtain them.  Apps can not be updated without knowledge of that ID and, more importantly, its password.  Apple IDs can not be merged and purchases can not be transferred from one ID to another.

Maybe you are looking for

  • Automatic Import and "Generating Thumbnails"

    I just installed imovie 08, and I have a couple of problems/questions. 1) When I start the Import Process, the Toggle that selects for Automatic or Manual import, goes to Manual and I can't change it..??? 2) After some video is imported the computer

  • Refurbished X201 integrated camera settings don't work

    My refurbished X201 (3680HN9) has an integrated camera (so says device manager) but nothing happens when I press FN+F6. I have downloaded the integrated camera driver from Lenovo support site but after install FN+F6 still does nothing. I would apprec

  • MY phones time did not update with daylights savings. How can I update?

    The time didn't change on my phone with daylight savings. I tried *228 and that didn't fix it. Any other ideas?

  • Hello Can I use Unlocked IPhone 5 S (sim free) in south America?(country : Ecuador)

    Hello , the thing is that I want to use it in Ecuador located in South America, so I was looking the page and I read that there where Iphone5 S unlocked sim free! But I'm not sure if it works in other country (not in United States only)

  • Adjust FX Render Quality

    In Avid you have the choice between different render options for your fx. Is there something similar in Premiere Pro? szenario: you want to expert render the fx in your sequence for final output. You are in any dv format project, but of course want t