I have a business requirement that requires assessing on a person’s first name to ensure it doesn’t have the character”1″. The model:
Public class Individual public string FirstName get; set;
I started writing the following function to perform the check:
Public CleanPersonFirstName(Person person) var blank = person; when (clean.FirstName.Contains("1")) clean.FirstName.Replace("1",""); return blank;
But I am not positive whether it is justifiable making a copy of the individual perform the test object, then return the copy.
Can the following be a much better approach?