Quantcast
Channel: Compare first & last name (C#) - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Compare first & last name (C#)

$
0
0

I have first name and last name in database and same fields, coming from Dto

I need to check if those fields is differs

I wrote code like this

client.* - values from database

input.* - values from DTO

var isNameChanged = (client.FirstName + client.LastName).ToLower().Replace(" ","") == (input.FirstName+input.LastName).ToLower().Replace(" ","");

Any suggestion on how I can beautify this code?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images