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

C#

 
AnswerRe: Datetime parsing Pin
ExcellentOrg7-Aug-13 7:57
ExcellentOrg7-Aug-13 7:57 
QuestionHow to convert string to form object in c# window application Pin
susanna.floora5-Aug-13 21:37
susanna.floora5-Aug-13 21:37 
AnswerRe: How to convert string to form object in c# window application Pin
ExcellentOrg5-Aug-13 22:34
ExcellentOrg5-Aug-13 22:34 
AnswerRe: How to convert string to form object in c# window application Pin
Rizny Mubarak5-Aug-13 23:43
Rizny Mubarak5-Aug-13 23:43 
QuestionRe: How to convert string to form object in c# window application Pin
Eddy Vluggen6-Aug-13 7:47
professionalEddy Vluggen6-Aug-13 7:47 
AnswerRe: How to convert string to form object in c# window application Pin
susanna.floora7-Aug-13 19:07
susanna.floora7-Aug-13 19:07 
AnswerRe: How to convert string to form object in c# window application Pin
ExcellentOrg6-Aug-13 9:22
ExcellentOrg6-Aug-13 9:22 
AnswerRe: How to convert string to form object in c# window application Pin
Jean A Brandelero8-Aug-13 10:45
Jean A Brandelero8-Aug-13 10:45 
GeneralRe: How to convert string to form object in c# window application Pin
susanna.floora9-Aug-13 2:02
susanna.floora9-Aug-13 2:02 
GeneralRe: How to convert string to form object in c# window application Pin
Jean A Brandelero9-Aug-13 7:51
Jean A Brandelero9-Aug-13 7:51 
AnswerRe: How to convert string to form object in c# window application Pin
BillWoodruff11-Aug-13 0:13
professionalBillWoodruff11-Aug-13 0:13 
GeneralRe: How to convert string to form object in c# window application Pin
susanna.floora26-Aug-13 21:47
susanna.floora26-Aug-13 21:47 
QuestionAutocomplete TextBox no find other words in string Pin
juliogyn5-Aug-13 16:49
juliogyn5-Aug-13 16:49 
AnswerRe: Autocomplete TextBox no find other words in string Pin
Abhinav S5-Aug-13 17:07
Abhinav S5-Aug-13 17:07 
GeneralRe: Autocomplete TextBox no find other words in string Pin
juliogyn5-Aug-13 18:08
juliogyn5-Aug-13 18:08 
AnswerRe: Autocomplete TextBox no find other words in string Pin
Abhinav S5-Aug-13 18:31
Abhinav S5-Aug-13 18:31 
GeneralRe: Autocomplete TextBox no find other words in string Pin
juliogyn6-Aug-13 9:18
juliogyn6-Aug-13 9:18 
QuestionTry, Catch, Finally question Pin
JD865-Aug-13 15:15
JD865-Aug-13 15:15 
I'm writing some DLL's and have a question.

If I throw the exception in the catch block does the finally ever execute? Reason why I am doing this is because the DLL's do not perform logging, the calling class does. But I need to make sure I dispose of my objects.

Example:

C#
SqlConnection conn = null;
SqlCommand cmd = null;

try
{
}
catch (Exception ex)
{
throw;
}
finally
{
if (cmd != null)
cmd.Dispose();

if (conn != null)
conn.Dispose();
}


IS that proper or should I dispose in the catch block AND the finally block because the finally will never execute since i'm rethrowing the exception?
AnswerRe: Try, Catch, Finally question Pin
Abhinav S5-Aug-13 16:45
Abhinav S5-Aug-13 16:45 
GeneralRe: Try, Catch, Finally question Pin
JD866-Aug-13 6:18
JD866-Aug-13 6:18 
AnswerRe: Try, Catch, Finally question Pin
ExcellentOrg5-Aug-13 22:06
ExcellentOrg5-Aug-13 22:06 
AnswerRe: Try, Catch, Finally question Pin
Bernhard Hiller5-Aug-13 22:46
Bernhard Hiller5-Aug-13 22:46 
GeneralRe: Try, Catch, Finally question Pin
JD866-Aug-13 6:18
JD866-Aug-13 6:18 
GeneralRe: Try, Catch, Finally question Pin
Jean A Brandelero8-Aug-13 10:47
Jean A Brandelero8-Aug-13 10:47 
QuestionClick-Once :: Publishing And Updates In Different Locations Pin
Matt U.5-Aug-13 8:17
Matt U.5-Aug-13 8:17 

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.