public int GetChannel(string mac)
{
while ((netshline = sr.ReadLine()) != null)
{
if(netshline.IndexOf("Channel") > 0)
{
mac = netshline.Substring(netshline.IndexOf(":") + 1).ToString();
}
}
return mac;
}
in return mac i am getting error
Cannot implicitly convert type string to int
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 17, 2013, 7:48 AM EDT
If you are sure that it will return integer value then you can convert it
int result=0;
Regards,
Iftikar
Joxin Stanly181 reputationPosted Aug 17, 2013, 8:58 AM EDT
mac =Convert.ToInt32( netshline.Substring( netshline.IndexOf(":") + 1) );
hope this helps...