Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
AnswerRe: How fast is a bubble sort? Pin
Daniel Grunwald10-Oct-06 7:49
Daniel Grunwald10-Oct-06 7:49 
AnswerRe: How fast is a bubble sort? Pin
Daniel Grunwald10-Oct-06 8:00
Daniel Grunwald10-Oct-06 8:00 
GeneralRe: How fast is a bubble sort? Pin
User 665810-Oct-06 8:57
User 665810-Oct-06 8:57 
GeneralRe: How fast is a bubble sort? Pin
Dan Neely10-Oct-06 9:39
Dan Neely10-Oct-06 9:39 
GeneralRe: How fast is a bubble sort? Pin
User 665811-Oct-06 3:35
User 665811-Oct-06 3:35 
QuestionCannot view data entry table in ReportViewer [modified] Pin
Ramith Sivanarain10-Oct-06 4:21
Ramith Sivanarain10-Oct-06 4:21 
Questionquestion about port scanning Pin
Green Fuze10-Oct-06 3:56
Green Fuze10-Oct-06 3:56 
AnswerRe: question about port scanning Pin
mikone10-Oct-06 4:43
mikone10-Oct-06 4:43 
Hi!

I'm not sure about this but you could try to do it like this:

<br />
System.Net.Sockets.TcpClient myclient = new System.Net.Sockets.TcpClient();<br />
for (int i = 0; i < 65535; i++)<br />
{<br />
   try<br />
   {<br />
     myclient.Connect("localhost", i);<br />
     // Client was able to connect, hence the specified port 'i' is open...<br />
   }<br />
   catch<br />
   {<br />
     // An Exception was thrown, hence there was a problem while connecting.. port 'i' closed?<br />
   }<br />
}<br />


This method is obviously not the best because it uses a try..catch statement and it will also throw an exception if a particular port is blocked by another application.
To get around this issue you will have to extend the exceptionhandling massively.

That's how i would do it but as already mentioned i'm pretty unexperienced...

Good luck,
mik
GeneralRe: question about port scanning Pin
Green Fuze12-Oct-06 14:28
Green Fuze12-Oct-06 14:28 
QuestionFilter a Record "Partial key search" Pin
aranhamarvel10-Oct-06 3:10
aranhamarvel10-Oct-06 3:10 
AnswerRe: Filter a Record "Partial key search" Pin
baerten10-Oct-06 4:33
baerten10-Oct-06 4:33 
GeneralRe: Filter a Record "Partial key search" Pin
aranhamarvel10-Oct-06 6:31
aranhamarvel10-Oct-06 6:31 
QuestionClickonce deployment Pin
Wajihs10-Oct-06 1:14
Wajihs10-Oct-06 1:14 
AnswerRe: Clickonce deployment Pin
Judah Gabriel Himango10-Oct-06 5:12
sponsorJudah Gabriel Himango10-Oct-06 5:12 
QuestionQuestions on .NET Remoting Pin
Robert Rohde10-Oct-06 0:59
Robert Rohde10-Oct-06 0:59 
AnswerRe: Questions on .NET Remoting Pin
S. Senthil Kumar10-Oct-06 2:51
S. Senthil Kumar10-Oct-06 2:51 
AnswerRe: Questions on .NET Remoting Pin
sathish s10-Oct-06 3:18
sathish s10-Oct-06 3:18 
AnswerRe: Questions on .NET Remoting Pin
mav.northwind10-Oct-06 5:36
mav.northwind10-Oct-06 5:36 
QuestionHow to create a shortcut for my application Pin
CJayMeister10-Oct-06 0:38
CJayMeister10-Oct-06 0:38 
AnswerRe: How to create a shortcut for my application Pin
g00fyman10-Oct-06 1:24
g00fyman10-Oct-06 1:24 
GeneralRe: How to create a shortcut for my application Pin
CJayMeister10-Oct-06 2:00
CJayMeister10-Oct-06 2:00 
Questionhow to take a screenShot using windows service Pin
Tariq Tario10-Oct-06 0:24
Tariq Tario10-Oct-06 0:24 
AnswerRe: how to take a screenShot using windows service Pin
g00fyman10-Oct-06 1:14
g00fyman10-Oct-06 1:14 
GeneralRe: how to take a screenShot using windows service Pin
Eric Dahlvang10-Oct-06 3:46
Eric Dahlvang10-Oct-06 3:46 
GeneralRe: how to take a screenShot using windows service Pin
Member 79236113-Jul-18 18:53
Member 79236113-Jul-18 18:53 

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.