Hi,
AFAIK there is not such a method, what you can do is read the
C:\windows\system32\drivers\etc\services file and parse it as needed. you
know that the format of a line is \d+\s+\w+
you will have to modify the \w+ part to include the service you want,
something like
"\w*" + ServiceName + "\w*"
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"John" <jo********@hotmail.com> wrote in message
news:d8**************************@posting.google.c om...
Hi,
I need to bind a socket to a port that's specified in the
C:\windows\system32\drivers\etc\services file. Is there a
GetPortByServiceName() method in C#? If not, does anyone have any
suggestions on how best to do this?
Thanks,
John