Hi thanks for your solution but i still have problem i repair as your solution
foreach (Element e in new FilteredElementCollector(doc).OfClass(typeof(WallType))){
Parameter cost = e.LookupParameter("Cost");
using (Transaction t = new Transaction(doc, "param"))
{
t.Start();
cost.Set(50);
t.Commit();
}
}
but i have this error in my revit