Once again upgrading from aspose tasks 19.3 to 22.3 and finding a difference in the evaluation of the following line of code which is checking to see if extended attribute ID exists:
if (_myMSProject.ExtendedAttributes.GetById(Convert.ToInt32(ExtendedAttributeTask.Text3.ToString(“D”))) == null)
In 19.3, first time through code, it evaluates to ‘null’ and correctly executes the code inside the If statement.
In 22.3, first time through code, the statement finds the attribute and does not go into the If statement.
What is the correct way to check for the existence of the extended attribute ID in 22.3 as I would expect it to be ‘null’ the first time through and need it to execute code inside the if statement.