Click here to Skip to main content
15,886,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Go to finally in try block Pin
vanikanc30-Jan-13 7:37
vanikanc30-Jan-13 7:37 
GeneralRe: Go to finally in try block Pin
Jibesh30-Jan-13 7:41
professionalJibesh30-Jan-13 7:41 
GeneralRe: Go to finally in try block Pin
vanikanc30-Jan-13 7:42
vanikanc30-Jan-13 7:42 
GeneralRe: Go to finally in try block Pin
Jibesh30-Jan-13 7:44
professionalJibesh30-Jan-13 7:44 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 15:44
devvvy31-Jan-13 15:44 
AnswerRe: Go to finally in try block Pin
Eddy Vluggen30-Jan-13 7:45
professionalEddy Vluggen30-Jan-13 7:45 
AnswerRe: Go to finally in try block Pin
PIEBALDconsult30-Jan-13 7:53
mvePIEBALDconsult30-Jan-13 7:53 
AnswerRe: Go to finally in try block Pin
jschell30-Jan-13 8:04
jschell30-Jan-13 8:04 
vanikanc wrote:
then it will end the program, and I would not have closed the connection to
database that is open.


When the program terminates the connection will be terminated as well.

And the only way you can terminate a database connection in C# anyways is if all of the following are true.
1. You have configured the connection pool to keep no idle connections.
2. There are no connections in use
3. You reset the pool.

Other than that just "closing" the connection does nothing more than return it to the connection pool.
AnswerRe: Go to finally in try block Pin
Abhinav S30-Jan-13 21:32
Abhinav S30-Jan-13 21:32 
AnswerRe: Go to finally in try block Pin
V.30-Jan-13 22:10
professionalV.30-Jan-13 22:10 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 22:15
professionalRahul Rajat Singh30-Jan-13 22:15 
AnswerRe: Go to finally in try block Pin
Rahul Rajat Singh30-Jan-13 22:18
professionalRahul Rajat Singh30-Jan-13 22:18 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 15:46
devvvy31-Jan-13 15:46 
QuestionUnit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:07
MacRuturaj30-Jan-13 7:07 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Ennis Ray Lynch, Jr.30-Jan-13 7:16
Ennis Ray Lynch, Jr.30-Jan-13 7:16 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:19
MacRuturaj30-Jan-13 7:19 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Ennis Ray Lynch, Jr.30-Jan-13 7:28
Ennis Ray Lynch, Jr.30-Jan-13 7:28 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
PIEBALDconsult30-Jan-13 7:22
mvePIEBALDconsult30-Jan-13 7:22 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:24
MacRuturaj30-Jan-13 7:24 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:22
professionalEddy Vluggen30-Jan-13 7:22 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:29
MacRuturaj30-Jan-13 7:29 
AnswerRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:32
professionalEddy Vluggen30-Jan-13 7:32 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:31
MacRuturaj30-Jan-13 7:31 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
Eddy Vluggen30-Jan-13 7:42
professionalEddy Vluggen30-Jan-13 7:42 
GeneralRe: Unit Conversion Application - C#, IIS, ASP.NET 4.0, WCF, Windows form app Pin
MacRuturaj30-Jan-13 7:49
MacRuturaj30-Jan-13 7:49 

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.