3
Reply

Must declare a body because it is not marked...

Katie B

Katie B

Apr 13 2013 7:39 AM
2.9k
Hi All, 

I've been reading up on this error message I keep getting and it seems people on other forums know it as a "beginners error". So I apologise in advance. Ive written code that will allow me to populate a combo box, but I havent had a chance to test it because I keep getting the following error "must declare a body because it is not marked abstract, external or partial. The error didnt appear until I tried to run it and I dont know either what it means or how to get rid of it!! I'll post my code below and highlight the line the error appears on....

private void cmbexamboard_SelectedIndexChanged(object sender, EventArgs e);
    {  
            class Qualifications
        {
            public string Type { get; set; }


        }
    

        List<Qualifications> qualificationslist = new List<Qualifications>()
        {
            new Qualifications(){Type = "GCE"},
            new Qualifications(){Type = "A-Level"},
        };

    }
Thanks in advance Kate

Answers (3)