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

C#

 
QuestionPPPoe connection creation in c# Pin
KARFER28-Mar-15 4:00
KARFER28-Mar-15 4:00 
Questionlocalazation simulation Pin
huthiafa27-Mar-15 23:33
huthiafa27-Mar-15 23:33 
GeneralRe: localazation simulation Pin
Richard MacCutchan27-Mar-15 23:57
mveRichard MacCutchan27-Mar-15 23:57 
QuestionGlobal variable in C# Pin
aahamdan27-Mar-15 23:24
aahamdan27-Mar-15 23:24 
AnswerRe: Global variable in C# Pin
OriginalGriff28-Mar-15 0:27
mveOriginalGriff28-Mar-15 0:27 
GeneralRe: Global variable in C# Pin
aahamdan4-Apr-15 4:07
aahamdan4-Apr-15 4:07 
GeneralRe: Global variable in C# Pin
OriginalGriff4-Apr-15 4:26
mveOriginalGriff4-Apr-15 4:26 
AnswerRe: Global variable in C# Pin
Afzaal Ahmad Zeeshan28-Mar-15 17:32
professionalAfzaal Ahmad Zeeshan28-Mar-15 17:32 
You never should create a variable for database connection in a global scope. It would consume resources even where you do not need a database connection. Such as, when user is not authenticated, and you're showing him a view (or a dialog box) to tell him that he cannot connect to the database for query purposes, but in the background database would be connected already. Which won't be a good usage of your logic or resources.

It would be better to create this variable, inside the function where you need it. Connection pooling would take care of the underlying connection maintenance for your application so that you won't get a delay for connecting to the database server.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Global variable in C# Pin
aahamdan4-Apr-15 4:06
aahamdan4-Apr-15 4:06 
QuestionMobile agent data gathering in WSNs Pin
huthiafa27-Mar-15 22:25
huthiafa27-Mar-15 22:25 
QuestionEnumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:01
KK Kod27-Mar-15 5:01 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
Sascha Lefèvre27-Mar-15 5:16
professionalSascha Lefèvre27-Mar-15 5:16 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:25
KK Kod27-Mar-15 5:25 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
Eddy Vluggen27-Mar-15 5:22
professionalEddy Vluggen27-Mar-15 5:22 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
KK Kod27-Mar-15 5:26
KK Kod27-Mar-15 5:26 
GeneralRe: Enumeration in C#,Different Input returning Same enumeration Pin
Eddy Vluggen27-Mar-15 6:20
professionalEddy Vluggen27-Mar-15 6:20 
AnswerRe: Enumeration in C#,Different Input returning Same enumeration Pin
PIEBALDconsult27-Mar-15 15:52
mvePIEBALDconsult27-Mar-15 15:52 
QuestionImage segmentation - show or hide clusters Pin
Member 1133638227-Mar-15 4:15
Member 1133638227-Mar-15 4:15 
AnswerRe: Image segmentation - show or hide clusters Pin
Eddy Vluggen27-Mar-15 9:29
professionalEddy Vluggen27-Mar-15 9:29 
QuestionI found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
patrickjiang258026-Mar-15 15:35
patrickjiang258026-Mar-15 15:35 
AnswerRe: I found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
Afzaal Ahmad Zeeshan26-Mar-15 17:01
professionalAfzaal Ahmad Zeeshan26-Mar-15 17:01 
GeneralRe: I found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
patrickjiang258026-Mar-15 22:27
patrickjiang258026-Mar-15 22:27 
GeneralRe: I found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
Afzaal Ahmad Zeeshan26-Mar-15 22:39
professionalAfzaal Ahmad Zeeshan26-Mar-15 22:39 
GeneralRe: I found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
patrickjiang258026-Mar-15 22:49
patrickjiang258026-Mar-15 22:49 
GeneralRe: I found some issues in coding but I don't know how to solve them. Could you give me some advices ? Pin
Afzaal Ahmad Zeeshan26-Mar-15 22:51
professionalAfzaal Ahmad Zeeshan26-Mar-15 22:51 

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.