With both string.Format and using string concatenation is adding spaces in my string, which is in turn making my Test methods fail.
Here is my ToString() method:
public override string ToString()
{
return string.Format("First name: {0}, Last name: {1}, Age: {2}", FirstName, LastName, Age);
}//end of ToString()
I also tried this and got the same output:
public override string ToString()
{
return "First name: " + FirstName + ", Last name: " + LastName + ", Age: " + Age;
}//end of ToString()
There is no space after the place holder, before the comma but when run this is the output:
First name: Jen , Last name: Doe , Age: 26
It puts a space after the placeholder, Why is this? how do I stop it