Hi, i know it's an old conversation but you don't know why it doesn't work for me?
var AL016 = "MS_FT_AL016_T";
var typObjektu = "TYP_OBJEKTU";
var NF103 = "MS_FT_NF103_T";
var NF109 = "MS_FT_NF109_T";
var NF121 = "MS_FT_NF121_T";
var NF127 = "MS_FT_NF127_T";
var NF128 = "MS_FT_NF128_T";
var FTJmeno = "MS_FT_JMENO_P_T";
List<string> names = new List<string>();
names.Add(AL016);
names.Add(NF103);
names.Add(NF109);
names.Add(NF121);
names.Add(NF127);
names.Add(NF128);
names.Add(FTJmeno);
foreach (var name in names)
{
FeatureLayer featureLayer = mv.Map.FindLayers(name).First() as FeatureLayer;
FeatureClass fc = featureLayer.GetTable() as FeatureClass;
await AddField(fc, typObjektu, "TEXT", "", "", 10);
object[] paraList = { fc, typObjektu, '"' + name + '"' }; //always comes NULL in the column
await StartATask("management.CalculateField", paraList);
}