Witam, mam problem z listami w Visual c#. Pojawia się kilka błędów, a mianowicie:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections.Generic;
namespace Program
{
public class Strona
{
public int Id { get; set; }
public string Adres { get; set; }
public Strona (int nId, string nAdres)
{
this.Id = nId;
this.Adres = nAdres;
}
}
public partial class program : Form
{
public program()
{
InitializeComponent();
}
List<Strona> SiteList = new List<Strona>();
Strona nowy = new Strona(1, "qqq");
SiteList.Add(nowy); //1. Invalid token '(' in class, struct, or interface member declaration; 2. Invalid token ')' in class, struct, or interface member declaration; 3. 'Program.program.SiteList' is a 'field' but is used like a 'type'; 4. The type or namespace name 'now' could not be found (are you missing a using directive or an assembly reference?)
}
}
Wszystko robiłem wg. poradnika, nie mam pojęcia z czym jest problem.