Closed Thread
Results 1 to 4 of 4

Thread: found one error and dont know how to correct

  1. #1
    maidos is offline Newbie
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    found one error and dont know how to correct

    im using visual studio and have ongoing school project so bare with me as im a newbie at this language.
    basically a console for hamburger program where ucan search and add but for some reason its giving me error on public static list<HamList> saying list not found :S

    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;

    namespace SuperSizeMe
    {
        public class 
    HamList
        
    {

            public 
    HamList(string Namnstring Dryckastring Pommesint kostnad)
            {
                
    this.Namn Namn;
                
    this.Drycka Drycka;
                
    this.genre Pommes;
                
    this.kostnad kostnad;
            }
        }

        public class 
    Program
        
    {
            public static list<
    HamListskiva = new list<HamList>();

            public static 
    void Main(string[] args)
            {
                
    MainMenu();
                
    taListan();
                
    Console.ReadLine();
                
    StreamWriter utfil = new StreamWriter("lager.txt");
                list.ForEach(
    delegate(taListan k)
                { 
    utfil.WriteLine(k.Namn utfil.NewLine k.Drycka utfil.Pommes k.kostnad); });
                
    utfil.Close();
            }
            public static 
    void MainMenu()
            {
                
    int funktion;
                
    Console.WriteLine("\n main menu");
                
    Console.WriteLine(" 1. söka hamburgare");
                
    Console.WriteLine(" 2. lista alla hamburgare ut");
                
    Console.WriteLine(" 3. mata in nya hamburgare");
                
    Console.WriteLine(" 4. ta mig härifrån");
                
    Console.Write(" Ditt val---> ");
                while (!
    int.TryParse(Console.ReadLine(), out funktion) || funktion || funktion 3)
                {
                    
    Console.WriteLine(" obs!... se upp funktioner och försök igen");
                    
    Console.Write(" Ditt val---> ");
                }
                
    Console.Clear();
                
    Console.ReadLine();
                if(
    funktion == 1)
                {
                    
    sök();
                }
                else if (
    funktion == 2)
                {
                    
    listaUt();
                }
            }
            public static 
    void sök()
            { 
            }
            public static 
    void listaUt()
            {
            }
        }



  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    lobo521 is offline Learning Programmer
    Join Date
    Jan 2010
    Posts
    57
    Rep Power
    8

    Re: found one error and dont know how to correct

    It should be:
    public static List<HamList> skiva = new List<HamList>();
    not:
    public static list<HamList> skiva = new list<HamList>();

  4. #3
    gokuajmes's Avatar
    gokuajmes is offline Programming God
    Join Date
    Jan 2010
    Location
    India
    Posts
    516
    Blog Entries
    5
    Rep Power
    12

    Re: found one error and dont know how to correct

    what is your native language !
    as said before its
    Code:
    public static List <HamList> Skiva = new List<HamList> ( );
    Say how did you get the code to syntax highlighted !

  5. #4
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: found one error and dont know how to correct

    He used the [PHP] and [/PHP] tags and th language is Swedish

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 04-29-2011, 02:46 PM
  2. NoClassDef Found error in Netbeans?
    By hampus.tagerud in forum Java Help
    Replies: 3
    Last Post: 10-20-2010, 10:00 AM
  3. can anyone help me i dont see my error
    By mmo-dev in forum PHP Development
    Replies: 3
    Last Post: 04-26-2010, 09:54 PM
  4. Get which page that wasn't found at HTTP 404 error.
    By Vswe in forum PHP Development
    Replies: 13
    Last Post: 11-08-2009, 01:58 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts