C# Bool Variable always false -



C# Bool Variable always false -

i comparing 2 strings:

bool d = (string.equals(ethernetheader.source,staticform.textbox1.text.tostring()));

this statement false in console both same below..

ethernetheader.source=00:25:64:4f:21:d9

textbox1.text=00:25:64:4f:21:d9

any possible reason??

thanks,

use trim in order have no spaces on lead or end of string.

boolean d = ethernetheader.source.trim() == staticform.textbox1.text.trim();

c# variables boolean

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -