Click here to Skip to main content
15,904,638 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# string operation Pin
PIEBALDconsult18-Jan-10 16:18
mvePIEBALDconsult18-Jan-10 16:18 
GeneralRe: c# string operation Pin
theOzLizard18-Jan-10 18:07
theOzLizard18-Jan-10 18:07 
AnswerRe: c# string operation Pin
dan!sh 17-Jan-10 23:45
professional dan!sh 17-Jan-10 23:45 
GeneralRe: c# string operation Pin
OriginalGriff18-Jan-10 0:20
mveOriginalGriff18-Jan-10 0:20 
GeneralRe: c# string operation Pin
dan!sh 18-Jan-10 0:49
professional dan!sh 18-Jan-10 0:49 
GeneralRe: c# string operation Pin
OriginalGriff18-Jan-10 1:21
mveOriginalGriff18-Jan-10 1:21 
GeneralRe: c# string operation Pin
dan!sh 18-Jan-10 3:57
professional dan!sh 18-Jan-10 3:57 
QuestionIs Anybody Can Help me Write an example of multicast use c# Thinks a lot ! Pin
SrhLj17-Jan-10 18:03
SrhLj17-Jan-10 18:03 
AnswerRe: Is Anybody Can Help me Write an example of multicast use c# Thinks a lot ! Pin
Garth J Lancaster17-Jan-10 18:57
professionalGarth J Lancaster17-Jan-10 18:57 
Questionhow to create a wrapper for r com server in C#, which involves R programming and its integration with C# . What is meant by a Rcom Wrapper??? Pin
scorpio2217-Jan-10 17:06
scorpio2217-Jan-10 17:06 
Questionneed direction to get started on app. To monitor dial-up internet Pin
Argus217-Jan-10 13:09
Argus217-Jan-10 13:09 
AnswerRe: need direction to get started on app. To monitor dial-up internet Pin
Harvey Saayman17-Jan-10 21:28
Harvey Saayman17-Jan-10 21:28 
AnswerRe: need direction to get started on app. To monitor dial-up internet Pin
Argus219-Jan-10 13:45
Argus219-Jan-10 13:45 
Questionhow to pass data from textbox in form1 to combobox in form2 Pin
johnnysmith117-Jan-10 11:13
johnnysmith117-Jan-10 11:13 
AnswerRe: how to pass data from textbox in form1 to combobox in form2 Pin
DaveyM6917-Jan-10 14:13
professionalDaveyM6917-Jan-10 14:13 
QuestionWhich is more correct? Pin
Bardy8517-Jan-10 6:25
Bardy8517-Jan-10 6:25 
AnswerRe: Which is more correct? Pin
harold aptroot17-Jan-10 6:30
harold aptroot17-Jan-10 6:30 
GeneralRe: Which is more correct? Pin
Bardy8517-Jan-10 6:52
Bardy8517-Jan-10 6:52 
GeneralRe: Which is more correct? Pin
Eddy Vluggen17-Jan-10 9:22
professionalEddy Vluggen17-Jan-10 9:22 
AnswerRe: Which is more correct? Pin
#realJSOP17-Jan-10 7:06
professional#realJSOP17-Jan-10 7:06 
GeneralRe: Which is more correct? Pin
Bardy8517-Jan-10 7:27
Bardy8517-Jan-10 7:27 
GeneralRe: Which is more correct? Pin
#realJSOP17-Jan-10 23:28
professional#realJSOP17-Jan-10 23:28 
AnswerRe: Which is more correct? Pin
DaveyM6917-Jan-10 7:20
professionalDaveyM6917-Jan-10 7:20 
If you want to cache your Employees for use throughout your application and it's acceptable to not reload them (i.e. they will not be changed by someone else acessing the DB) then it's OK to keep a static reference.

One or two points though. Don't make fields public, you should create a static readonly property (i.e. only a getter) to expose the cached List.
If you have a lot of data stored in your list then you may end up with memory issues, so it may be wise to only store the basic information such as ID and Name, and look up the rest of the data when required.

Have you considered using the Singleton pattern and have a Manager/Factory class that creates the list only when it is first needed? It won't offer any huge improvements, but can be a more logical approach. Without knowing the exact requirements and other implementation details it's hard to say but may be worth investigating.

Dave

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: Which is more correct? Pin
Bardy8517-Jan-10 7:43
Bardy8517-Jan-10 7:43 
GeneralRe: Which is more correct? Pin
DaveyM6917-Jan-10 7:55
professionalDaveyM6917-Jan-10 7:55 

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.