Get hexadecimal value from TextBox

hi,i m new to this area.i m doing XML operations using c-sharp. have two textboxes.i want to enter hexadecimal input like this 0x000,0x0ff.my problem is: i got format exception when i am entering hexadecimal values into textbox and perform some operations.i want to display difference between two hexadecimal numbers.my code is like this.