Click here to Skip to main content
15,893,904 members
Home / Discussions / C#
   

C#

 
Questionis there a reverse of @"abc"? Pin
Ariadne29-Sep-05 5:27
Ariadne29-Sep-05 5:27 
AnswerRe: is there a reverse of @"abc"? Pin
leppie29-Sep-05 5:36
leppie29-Sep-05 5:36 
GeneralRe: is there a reverse of @"abc"? Pin
Ariadne29-Sep-05 5:49
Ariadne29-Sep-05 5:49 
GeneralRe: is there a reverse of @"abc"? Pin
leppie29-Sep-05 6:05
leppie29-Sep-05 6:05 
AnswerRe: is there a reverse of @"abc"? Pin
Luis Alonso Ramos29-Sep-05 17:34
Luis Alonso Ramos29-Sep-05 17:34 
GeneralRe: is there a reverse of @"abc"? Pin
Ariadne29-Sep-05 20:07
Ariadne29-Sep-05 20:07 
GeneralRe: is there a reverse of @"abc"? Pin
Luis Alonso Ramos30-Sep-05 8:33
Luis Alonso Ramos30-Sep-05 8:33 
Question.Net Client app holding socket... Pin
Jason Weibel29-Sep-05 4:40
Jason Weibel29-Sep-05 4:40 
I have a .net windows client application that queries a .net web service. After the client has called the web service if netstat is run from the command line the results will show 10 sockets still open. Below is the code from my client app. My questions are
1. Why does the client app need 10 sockets?
2. What can I do to force the closing of the sockets since the GC.Collect() & GC.WaitForPendingFinalizers() methods don't seem to be doing it?
3. Does it really matter if the sockets are not immediately closed?
Private Sub LogIn()<br />
    If IsUserOffLine() Then Exit Sub<br />
    Dim wsEmpInfo As EmpInfoWS.EmployeeInformation = BF.SetUpWS()<br />
  Try<br />
    wsEmpInfo.SetEmployeeCheckIn(BF.GetUserName, txtLogInComments.Text)<br />
  Catch Ex As Exception<br />
    Call IsUserOffLine()<br />
  Finally<br />
    wsEmpInfo.Dispose()<br />
  End Try<br />
    Dim tRefreshForm As New Thread(New ThreadStart(AddressOf RefreshForm))<br />
  Try<br />
    tRefreshForm.Start()<br />
  Catch ex As Exception<br />
    tRefreshForm = Nothing<br />
  End Try<br />
  End Sub<br />
  <br />
  Private Sub RefreshForm()<br />
  Try<br />
    Call PopulateForm()<br />
    Call HandleNotify()<br />
    Call ShowScrollingNote()<br />
    Call CleanUp()<br />
  Catch<br />
  End Try<br />
  End Sub<br />
  <br />
  Private Sub CleanUp()<br />
  Try<br />
    GC.Collect()<br />
    GC.WaitForPendingFinalizers()<br />
  Catch<br />
  End Try<br />
  End Sub

I appreciate any suggesting you have, thank you.

Jason W.
GeneralRe: .Net Client app holding socket... Pin
Stefan Troschuetz29-Sep-05 4:59
Stefan Troschuetz29-Sep-05 4:59 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 5:04
Jason Weibel29-Sep-05 5:04 
AnswerRe: .Net Client app holding socket... Pin
leppie29-Sep-05 5:23
leppie29-Sep-05 5:23 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 5:29
Jason Weibel29-Sep-05 5:29 
GeneralRe: .Net Client app holding socket... Pin
leppie29-Sep-05 5:32
leppie29-Sep-05 5:32 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 5:39
Jason Weibel29-Sep-05 5:39 
GeneralRe: .Net Client app holding socket... Pin
leppie29-Sep-05 5:43
leppie29-Sep-05 5:43 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 5:51
Jason Weibel29-Sep-05 5:51 
GeneralRe: .Net Client app holding socket... Pin
leppie29-Sep-05 5:49
leppie29-Sep-05 5:49 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 6:02
Jason Weibel29-Sep-05 6:02 
GeneralRe: .Net Client app holding socket... Pin
leppie29-Sep-05 6:13
leppie29-Sep-05 6:13 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 6:16
Jason Weibel29-Sep-05 6:16 
GeneralRe: .Net Client app holding socket... Pin
leppie29-Sep-05 6:43
leppie29-Sep-05 6:43 
GeneralRe: .Net Client app holding socket... Pin
Jason Weibel29-Sep-05 7:54
Jason Weibel29-Sep-05 7:54 
QuestionTimer that simply records the duration of a process Pin
thepolishguy29-Sep-05 4:22
thepolishguy29-Sep-05 4:22 
AnswerRe: Timer that simply records the duration of a process Pin
Ashok Dhamija29-Sep-05 4:53
Ashok Dhamija29-Sep-05 4:53 
AnswerRe: Timer that simply records the duration of a process Pin
Dave Kreskowiak29-Sep-05 8:10
mveDave Kreskowiak29-Sep-05 8:10 

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.