Click here to Skip to main content
15,914,594 members
Home / Discussions / C#
   

C#

 
GeneralRe: Datetime parsing Pin
ExcellentOrg5-Aug-13 23:30
ExcellentOrg5-Aug-13 23:30 
AnswerRe: Datetime parsing Pin
Richard MacCutchan6-Aug-13 0:04
mveRichard MacCutchan6-Aug-13 0:04 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 9:19
ExcellentOrg6-Aug-13 9:19 
AnswerRe: Datetime parsing Pin
Richard MacCutchan6-Aug-13 0:09
mveRichard MacCutchan6-Aug-13 0:09 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 9:10
ExcellentOrg6-Aug-13 9:10 
AnswerRe: Datetime parsing Pin
Mycroft Holmes6-Aug-13 12:56
professionalMycroft Holmes6-Aug-13 12:56 
GeneralRe: Datetime parsing Pin
ExcellentOrg6-Aug-13 18:52
ExcellentOrg6-Aug-13 18:52 
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?

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.