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

ruby on rails - Devise Logout Error in RoR -

model view controller - MVC Rails Planning -

php - Working with pretty urls on apache and fastcgi after hhvm installation -