Aspose.Tasks.Examples.CSharp.WorkingWithFormulas.FormulaWithProjectFields.CreateTestProjectWithCustomFieldWithoutResource C# (CSharp) Method

CreateTestProjectWithCustomFieldWithoutResource() static private method

static private CreateTestProjectWithCustomFieldWithoutResource ( ) : Project
return Project
        static Project CreateTestProjectWithCustomFieldWithoutResource()
        {
            Project project = new Project();
            project.Set(Prj.StartDate, new DateTime(2015, 3, 6, 8, 0, 0));
            ExtendedAttributeDefinition attr = new ExtendedAttributeDefinition();
            attr.FieldId = ExtendedAttributeTask.Text1.ToString("D");
            project.ExtendedAttributes.Add(attr);
         
            Task task = project.RootTask.Children.Add("Task");
            ExtendedAttribute a = attr.CreateExtendedAttribute();
            task.ExtendedAttributes.Add(a);
            return project;
        }
        // ExEnd:FormulaWithProjectFields