Entity Name and .ToString()
Posted: Fri Jul 01, 2011 12:30 pm
I think that it will be usefull if we may assign a Name to an entity, and overriding the default .ToString method so that the Name sill be returned.
In this way, build a log file to debug the physic should me more easy.
I've added to the EntityBase class this code:
In this way, build a log file to debug the physic should me more easy.
I've added to the EntityBase class this code:
Code: Select all
public string Name { get; set; }
public override string ToString()
{
if (String.IsNullOrEmpty(Name))
return base.ToString();
return Name;
}