//See "Change Annotation Text Graphic" for an alternative if TEXTSTRING is missing from the schema
await QueuedTask.Run(() =>
{
//annoLayer is ~your~ Annotation layer...
// use the inspector methodology
var insp = new Inspector();
insp.Load(annoLayer, oid);
// make sure TextString attribute exists.
//It is not guaranteed to be in the schema
ArcGIS.Desktop.Editing.Attributes.Attribute att = insp.FirstOrDefault(a => a.FieldName == "TEXTSTRING");
if (att != null)
{
insp["TEXTSTRING"] = "Hello World";
//create and execute the edit operation
EditOperation op = new EditOperation();
op.Name = "Update annotation";
op.Modify(insp);
//OR using a Dictionary - again TEXTSTRING has to exist in the schema
//Dictionary<string, object> newAtts = new Dictionary<string, object>();
//newAtts.Add("TEXTSTRING", "hello world");
//op.Modify(annoLayer, oid, newAtts);
op.Execute();
}
});