Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to use Bass.Net.dll Pin
Colin Angus Mackay20-Jan-06 5:36
Colin Angus Mackay20-Jan-06 5:36 
GeneralRe: How to use Bass.Net.dll Pin
Divyang Mithaiwala20-Jan-06 6:25
Divyang Mithaiwala20-Jan-06 6:25 
GeneralRe: How to use Bass.Net.dll Pin
Dave Kreskowiak20-Jan-06 7:01
mveDave Kreskowiak20-Jan-06 7:01 
Questiondatagrid out of bound error,Plz help Pin
rudra08320-Jan-06 1:47
rudra08320-Jan-06 1:47 
QuestionDatagrid Selection ,Giving out of bound index error Pin
rudra08320-Jan-06 1:45
rudra08320-Jan-06 1:45 
QuestionHELP ME! SymbianOS and C# Pin
keisee20-Jan-06 1:43
keisee20-Jan-06 1:43 
Questionretrieve MAC address without SendARP Pin
ESTAN20-Jan-06 1:30
ESTAN20-Jan-06 1:30 
AnswerRe: retrieve MAC address without SendARP Pin
ESTAN25-Jan-06 2:06
ESTAN25-Jan-06 2:06 
Hello,

I found a sort of solution. I hope to help other people out with this...

<br />
string sComputerName = ""; // The hostname<br />
try<br />
{<br />
	Process p = new Process();<br />
	string cmd = "";<br />
	cmd = System.Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\cmd.exe";<br />
	p.StartInfo.FileName = cmd;<br />
	p.StartInfo.Arguments = "/C nbtstat -a " + sComputerName + "";<br />
	p.StartInfo.RedirectStandardOutput = true;<br />
	p.StartInfo.UseShellExecute = false;<br />
	p.StartInfo.CreateNoWindow = true;<br />
	p.Start();<br />
	p.WaitForExit(1000);<br />
	string output = p.StandardOutput.ReadToEnd();<br />
<br />
	if (CharCount(output, "MAC Address = ") != 0) // if the string is available, the mac address was found, so cut it out of the return message<br />
	{<br />
		int iPos = output.IndexOf("MAC Address = ");<br />
		sMacAddress = Mid(output, iPos + 14, 17);<br />
	}<br />
}<br />
catch (Exception) {}<br />
<br />
public static string Mid(string strParam, int startIndex, int length)<br />
{<br />
	string tmpstr = strParam.Substring(startIndex, length);<br />
	return tmpstr;<br />
}<br />
<br />
public static int CharCount(string strSource, string strToCount)<br />
{<br />
	int iCount = 0;<br />
	int iPos = strSource.IndexOf(strToCount);<br />
	while (iPos != -1)<br />
	{<br />
		iCount++;<br />
		strSource = strSource.Substring(iPos + 1);<br />
		iPos = strSource.IndexOf(strToCount);<br />
	}<br />
	return iCount;<br />
}

GeneralRe: retrieve MAC address without SendARP Pin
activee17-Feb-06 0:43
activee17-Feb-06 0:43 
GeneralRe: retrieve MAC address without SendARP Pin
ESTAN3-Mar-06 1:47
ESTAN3-Mar-06 1:47 
QuestionNew in C# and SQL Server (Express Editions) Pin
twickl20-Jan-06 1:17
twickl20-Jan-06 1:17 
AnswerRe: New in C# and SQL Server (Express Editions) Pin
CodyGen20-Jan-06 3:38
CodyGen20-Jan-06 3:38 
AnswerRe: New in C# and SQL Server (Express Editions) Pin
mav.northwind20-Jan-06 4:25
mav.northwind20-Jan-06 4:25 
Questionhow to take integer input in c# Pin
Yuwraj20-Jan-06 0:48
Yuwraj20-Jan-06 0:48 
AnswerRe: how to take integer input in c# Pin
Divyang Mithaiwala20-Jan-06 1:18
Divyang Mithaiwala20-Jan-06 1:18 
GeneralRe: how to take integer input in c# Pin
Yuwraj20-Jan-06 1:29
Yuwraj20-Jan-06 1:29 
GeneralRe: how to take integer input in c# Pin
Colin Angus Mackay20-Jan-06 1:48
Colin Angus Mackay20-Jan-06 1:48 
AnswerRe: how to take integer input in c# Pin
CodyGen20-Jan-06 10:23
CodyGen20-Jan-06 10:23 
QuestionRegarding Browser Pin
A.Grover20-Jan-06 0:27
A.Grover20-Jan-06 0:27 
QuestionMethod argument Pin
Cannoneer20-Jan-06 0:05
Cannoneer20-Jan-06 0:05 
AnswerRe: Method argument Pin
Divyang Mithaiwala20-Jan-06 1:35
Divyang Mithaiwala20-Jan-06 1:35 
GeneralRe: Method argument Pin
Cannoneer20-Jan-06 2:32
Cannoneer20-Jan-06 2:32 
AnswerRe: Method argument Pin
Le centriste20-Jan-06 1:36
Le centriste20-Jan-06 1:36 
GeneralRe: Method argument Pin
Cannoneer20-Jan-06 2:33
Cannoneer20-Jan-06 2:33 
Questionhow to create multitabbed browser Pin
sachu_vidya19-Jan-06 23:16
sachu_vidya19-Jan-06 23:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.