How do you know if a value was passed in on a property that does not have the [Required]
flag.
What will be the value of an string that is not required and was not passed in? If it is an empty string then how do you know the difference from a empty string sent by the caller?
If you need to know if a value was set or not then you can make a flag in your property for example
public MyTask : Task
{
private string mName;
private bool mNameSet;
public string Name
{
get{return mName;}
set
{
mName = value;
mNameSet = true;
}
}
... MORE HERE
}
So you can just check the mNameSet flag to see if the property was set or not. Sayed Ibrahim Hashimi
My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build