Here is the code snippet:
using(SpSite site=new SPSite("Server"))
{
using(SpWeb web=site.OpenWeb())
{
SpList list=web.Lists["ListName"];
SpListItem item=list.Items.Add();
}
Enjoy
using(SpSite site=new SPSite("Server"))
{
using(SpWeb web=site.OpenWeb())
{
SpList list=web.Lists["ListName"];
SpListItem item=list.Items.Add();
item["Title"] = "testTitle";
item["Description"]="test";
item.Update();
}}
Enjoy