Click here to Skip to main content
15,914,608 members
Home / Discussions / C#
   

C#

 
GeneralRe: Color Names Pin
AB777116-Feb-06 21:35
AB777116-Feb-06 21:35 
AnswerRe: Color Names Pin
Guffa16-Feb-06 21:43
Guffa16-Feb-06 21:43 
GeneralRe: Color Names Pin
AB777116-Feb-06 21:50
AB777116-Feb-06 21:50 
GeneralRe: Color Names Pin
J4amieC16-Feb-06 22:02
J4amieC16-Feb-06 22:02 
GeneralRe: Color Names Pin
AB777116-Feb-06 22:05
AB777116-Feb-06 22:05 
GeneralRe: Color Names Pin
Joshua Quick16-Feb-06 22:45
Joshua Quick16-Feb-06 22:45 
Questionhow to get the hostname of a client pc in my network Pin
batmanAgen16-Feb-06 18:40
batmanAgen16-Feb-06 18:40 
AnswerRe: how to get the hostname of a client pc in my network Pin
fang_eric16-Feb-06 21:23
fang_eric16-Feb-06 21:23 
I think the GetHostbyAddress() method can help you.

the followed code is copyed from msdn:
try
{
IPAddress hostIPAddress = IPAddress.Parse(IpAddressString);
IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);
// Get the IP address list that resolves to the host names contained in
// the Alias property.
IPAddress[] address = hostInfo.AddressList;
// Get the alias names of the addresses in the IP address list.
String[] alias = hostInfo.Aliases;

Console.WriteLine("Host name : " + hostInfo.HostName);
Console.WriteLine("\nAliases :");
for(int index=0; index < alias.Length; index++) {
Console.WriteLine(alias[index]);
}
Console.WriteLine("\nIP address list : ");
for(int index=0; index < address.Length; index++) {
Console.WriteLine(address[index]);
}
}
catch(SocketException e)
{
Console.WriteLine("SocketException caught!!!");
Console.WriteLine("Source : " + e.Source);
Console.WriteLine("Message : " + e.Message);
}
catch(FormatException e)
{
Console.WriteLine("FormatException caught!!!");
Console.WriteLine("Source : " + e.Source);
Console.WriteLine("Message : " + e.Message);
}
catch(ArgumentNullException e)
{
Console.WriteLine("ArgumentNullException caught!!!");
Console.WriteLine("Source : " + e.Source);
Console.WriteLine("Message : " + e.Message);
}
catch(Exception e)
{
Console.WriteLine("Exception caught!!!");
Console.WriteLine("Source : " + e.Source);
Console.WriteLine("Message : " + e.Message);
}


Just do it!
Questionuser control is not getting loaded Pin
sasire1816-Feb-06 18:31
sasire1816-Feb-06 18:31 
AnswerRe: user control is not getting loaded Pin
nandank8116-Feb-06 18:59
nandank8116-Feb-06 18:59 
QuestionQuestion about create simple image in c# Pin
Yanshof16-Feb-06 18:18
Yanshof16-Feb-06 18:18 
QuestionClipboard Issues Pin
nemnesic16-Feb-06 17:14
nemnesic16-Feb-06 17:14 
QuestionC# 2005 - Datagrid and comboBoxes, How do I ... ? Pin
JC Carmo16-Feb-06 17:08
JC Carmo16-Feb-06 17:08 
QuestionC# 2005 - childForm setting MDIParent of another childForm Pin
JC Carmo16-Feb-06 17:06
JC Carmo16-Feb-06 17:06 
AnswerRe: C# 2005 - childForm setting MDIParent of another childForm Pin
nandank8116-Feb-06 19:10
nandank8116-Feb-06 19:10 
AnswerRe: C# 2005 - childForm setting MDIParent of another childForm Pin
AB777116-Feb-06 19:12
AB777116-Feb-06 19:12 
QuestionWebBrowser Control Callbacks Pin
Twisty McGee16-Feb-06 15:04
Twisty McGee16-Feb-06 15:04 
QuestionShow ContextMenu Automatically Pin
jgallen2316-Feb-06 14:16
jgallen2316-Feb-06 14:16 
AnswerRe: Show ContextMenu Automatically Pin
nandank8116-Feb-06 19:14
nandank8116-Feb-06 19:14 
GeneralRe: Show ContextMenu Automatically Pin
jgallen2317-Feb-06 5:32
jgallen2317-Feb-06 5:32 
QuestionModal Dialogs Pin
Tyrus18216-Feb-06 14:01
Tyrus18216-Feb-06 14:01 
AnswerRe: Modal Dialogs Pin
Joshua Quick16-Feb-06 14:28
Joshua Quick16-Feb-06 14:28 
AnswerRe: Modal Dialogs Pin
Dave Kreskowiak16-Feb-06 14:30
mveDave Kreskowiak16-Feb-06 14:30 
QuestionDataList Pin
Sean8916-Feb-06 13:53
Sean8916-Feb-06 13:53 
News[Message Deleted] Pin
Ahmad Mahmoud [candseeme]16-Feb-06 13:33
Ahmad Mahmoud [candseeme]16-Feb-06 13:33 

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.