Click here to Skip to main content
15,901,505 members
Home / Discussions / C#
   

C#

 
QuestionC# and .Net, trying to select a list of classes from name of node in xml file Pin
Perry Nordmann5-Aug-12 4:52
Perry Nordmann5-Aug-12 4:52 
AnswerRe: C# and .Net, trying to select a list of classes from name of node in xml file Pin
Ed Hill _5_5-Aug-12 22:16
Ed Hill _5_5-Aug-12 22:16 
GeneralRe: C# and .Net, trying to select a list of classes from name of node in xml file Pin
Perry Nordmann6-Aug-12 3:27
Perry Nordmann6-Aug-12 3:27 
GeneralC# Developer looking for a new project Pin
Liam Cairns Kelly4-Aug-12 15:39
Liam Cairns Kelly4-Aug-12 15:39 
AnswerRe: C# Developer looking for a new project Pin
Wes Aday4-Aug-12 15:43
professionalWes Aday4-Aug-12 15:43 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly4-Aug-12 15:45
Liam Cairns Kelly4-Aug-12 15:45 
GeneralRe: C# Developer looking for a new project Pin
Wes Aday4-Aug-12 15:50
professionalWes Aday4-Aug-12 15:50 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly4-Aug-12 15:51
Liam Cairns Kelly4-Aug-12 15:51 
GeneralRe: C# Developer looking for a new project Pin
Wes Aday4-Aug-12 15:53
professionalWes Aday4-Aug-12 15:53 
GeneralRe: C# Developer looking for a new project Pin
Mycroft Holmes4-Aug-12 17:47
professionalMycroft Holmes4-Aug-12 17:47 
GeneralRe: C# Developer looking for a new project Pin
Liam Cairns Kelly5-Aug-12 5:13
Liam Cairns Kelly5-Aug-12 5:13 
GeneralRe: C# Developer looking for a new project Pin
jschell5-Aug-12 7:56
jschell5-Aug-12 7:56 
QuestionC# 2010 change linq to sql Pin
dcof4-Aug-12 11:03
dcof4-Aug-12 11:03 
Questiondispose (always?) Pin
thewazz4-Aug-12 7:46
professionalthewazz4-Aug-12 7:46 
GeneralRe: dispose (always?) Pin
PIEBALDconsult4-Aug-12 8:25
mvePIEBALDconsult4-Aug-12 8:25 
GeneralRe: dispose (always?) Pin
OriginalGriff5-Aug-12 22:18
mveOriginalGriff5-Aug-12 22:18 
AnswerRe: dispose (always?) Pin
Ed Hill _5_5-Aug-12 22:12
Ed Hill _5_5-Aug-12 22:12 
AnswerRe: dispose (always?) Pin
OriginalGriff5-Aug-12 22:18
mveOriginalGriff5-Aug-12 22:18 
AnswerRe: dispose (always?) Pin
BobJanova5-Aug-12 23:49
BobJanova5-Aug-12 23:49 
GeneralRe: dispose (always?) Pin
PIEBALDconsult6-Aug-12 3:50
mvePIEBALDconsult6-Aug-12 3:50 
GeneralRe: dispose (always?) Pin
BobJanova7-Aug-12 0:26
BobJanova7-Aug-12 0:26 
GeneralRe: dispose (always?) Pin
PIEBALDconsult7-Aug-12 3:36
mvePIEBALDconsult7-Aug-12 3:36 
GeneralRe: dispose (always?) Pin
thewazz7-Aug-12 4:58
professionalthewazz7-Aug-12 4:58 
GeneralRe: dispose (always?) Pin
Pete O'Hanlon7-Aug-12 23:43
mvePete O'Hanlon7-Aug-12 23:43 
GeneralRe: dispose (always?) Pin
jschell10-Aug-12 12:42
jschell10-Aug-12 12:42 
PIEBALDconsult wrote:
So you can hold onto a Connection for a long time and only open it when you need it.


True but in normal practice that shouldn't happen.

First the significance in the object is the connection. If there is no connection then the object itself is light weight so creation itself isn't doing anything (again for most situations.)

Second if you keep it around you must explicitly manage the state. So to reuse it you would need to either explicitly check the state or implicitly assume the state is correct. The first case requires additional code and the second leads to complexity as the maintenance engineer would need to insure correct state. Both of those cases are more easily solved by using creation.

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.