Try This
SPList currentList = currentWeb.Lists["DocLib"]; SPField newField = currentList.Fields.CreateNewField(SPFieldType.Text.ToString(), "New Field2"); currentList.Fields.AddFieldAsXml(newField.SchemaXml, true, SPAddFieldOptions.AddToAllContentTypes); currentList.Update();