public static void Run()
{
// ExStart:UsingArithmeticExpression
Project project = CreateTestProjectWithCustomField();
// Set arithmetic formula for extended attribute
ExtendedAttributeDefinition attr = project.ExtendedAttributes[0];
attr.Alias = "Arithmetic Expression";
attr.Formula = "(1+3*(2+ -5)+8/2)^3";
// Display extended attribute value
Task task = project.RootTask.Children.GetById(1);
Console.WriteLine(task.ExtendedAttributes[0].Value);
// ExEnd:UsingArithmeticExpression
}