Difference Between Task.Name and GetTaskName()
Raz A.
Haifa,

Mar 1, 2019
49 Posts

Difference between Task.Name and GetTaskName()

What is the difference between Task.Name and GetTaskName()?

Solution Available
Jason D.
Irvine, CA

Mar 4, 2019
32 Posts

Re: Difference between Task.Name and GetTaskName()

Hi Raz,

Task.Name can only be used when there is a task running. If you try to access Task.Name in Program.OnInit (there is no running task) then you will get an "Object is null" error. In the same scenario, GetTaskName() would return an empty string instead of erroring.

Regards,
Jason



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]