Hi Biswajeet,
I have observed that when we have a task in MPP file having start, finish and duration then no tag for StartText, FinishText and DurationText is present in the project. If we read this MPP using Aspose.Tasks and display value of these text properties we get NULL. This null shows that respective fields have proper values.
On the other hand if we delete some text from a field say “Start”, then a text tag is automatically added containing an empty string. Now if we use Aspose.Task to read “StartText” property, it does not return NULL but returns empty string “”, which shows that this field has no text in the field.
You may please try following sample code which demonstrates this behavior. If some Text property is NULL, it means data is there and if it returns empty string i.e. “”, it means that respective property has no text in the field.
It should be noted that deleting text from the field does not remove that property from the respective field. For example if you delete text from start field, it will set the StartText property value to “” but it will not empty the START field. This can be confirmed by saving the MPP file (after deleting text) as XML using MSP 2010 and viewing the tags in notepad.
static void test()
{
var without = new Project(@"MPPIWithoutStart&End.mpp");
var with = new Project(@"MPPIWithStart&End.mpp");
var taskWithout = without.RootTask.Children.ToList()[0];
var taskWith = with.RootTask.Children.ToList()[0];
var startTextWithout = taskWithout.Get(Tsk.StartText);
var startTextWith = taskWith.Get(Tsk.StartText);
var startWithout = taskWithout.Get(Tsk.Start);
var startWith = taskWith.Get(Tsk.Start);
var endTextWithout = taskWithout.Get(Tsk.FinishText);
var endTextWith = taskWith.Get(Tsk.FinishText);
var endWithout = taskWithout.Get(Tsk.Finish);
var endWith = taskWith.Get(Tsk.Finish);
var durationTextWithout = taskWithout.Get(Tsk.DurationText);
var durationTextWith = taskWith.Get(Tsk.DurationText);
var durationWithout = taskWithout.Get(Tsk.Duration);
var durationWith = taskWith.Get(Tsk.Duration);
}