sarada

sarada

  • NA
  • 34
  • 0

how to avoid integer error?

Jul 27 2009 1:14 AM
hi
I have converted mac address by parsing into int in this way

string s=  nic.GetPhysicalAddress().ToString();
int k=Int32.Parse(s, System.Globalization.NumberStyles.HexNumber);
 MessageBox.Show(Convert.ToString(k));
here, it is raising error as 'value is either too large or too small for int32'.I tried with int64 also but it is raising cannot implicitly convert long to int.How can i solve this?

Answers (1)