Click here to Skip to main content
15,879,095 members
Home / Discussions / C#
   

C#

 
GeneralRe: How I can find selected control on any window from mouse click c# Pin
delphix510-Dec-13 5:16
delphix510-Dec-13 5:16 
GeneralRe: How I can find selected control on any window from mouse click c# Pin
Dave Kreskowiak10-Dec-13 5:43
mveDave Kreskowiak10-Dec-13 5:43 
GeneralRe: How I can find selected control on any window from mouse click c# Pin
delphix510-Dec-13 6:55
delphix510-Dec-13 6:55 
AnswerRe: How I can find selected control on any window from mouse click c# Pin
Eddy Vluggen10-Dec-13 8:06
professionalEddy Vluggen10-Dec-13 8:06 
AnswerRe: How I can find selected control on any window from mouse click c# Pin
BillWoodruff10-Dec-13 5:52
professionalBillWoodruff10-Dec-13 5:52 
GeneralRe: How I can find selected control on any window from mouse click c# Pin
delphix510-Dec-13 7:03
delphix510-Dec-13 7:03 
GeneralRe: How I can find selected control on any window from mouse click c# Pin
GuyThiebaut10-Dec-13 22:35
professionalGuyThiebaut10-Dec-13 22:35 
QuestionList<> VS Dictionary<,> Pin
HobbyProggy9-Dec-13 22:14
professionalHobbyProggy9-Dec-13 22:14 
Hi there,

my question is what might fit better to storing objects.

I have a routine where i save ListViewItems and another for storing objects (selfmade class Resource) into a Dictionary.
But my collegue told me i should use a List<> because they are better.

I missed the why they are better.
So anyone can explain me why they should be better and whats the significant difference?

EDIT:

To explain more specific:

I need a container to store objects of my models that will be generated by Loops according to the data provided by my database.

e.g.:

I have a class Resource

C#
public class Resource
    {
        MSSQL _dbIMS = null;
        SqlGenerator _sqlGenerator = null;

        private string _name = "";
        private string _firstName = "";
        private string _idEmployee = "";
        private string _idCalendar = "";
        private string _idBenDivFaeh = "";
        private string _personalID = "";
        private string _phoneNumber = "";
        private string _costCentre = "";
        private double _costsPerHour = 0.0;
        private string _idDivision = "";
        private bool _modified = false;


This will be generated after i loaded the values out of the database. Those objects then need to be stored somewhere so i can add them to a ListView.

Later on i will have those ListViewItems related to a advTree with projects and to another with divisions, the ListViewItems can be dragged and dropped onto the advTrees to modify the relation to a division for example.

So where to store the objects of the resource? List or Dictionary?

I hope this is a better explanation

Thanks in advance
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}


modified 10-Dec-13 4:32am.

AnswerRe: List<> VS Dictionary<,> Pin
Marco Bertschi9-Dec-13 22:24
protectorMarco Bertschi9-Dec-13 22:24 
AnswerRe: List<> VS Dictionary<,> PinPopular
Pete O'Hanlon9-Dec-13 22:59
mvePete O'Hanlon9-Dec-13 22:59 
GeneralRe: List<> VS Dictionary<,> Pin
HobbyProggy9-Dec-13 23:10
professionalHobbyProggy9-Dec-13 23:10 
GeneralRe: List<> VS Dictionary<,> Pin
Keith Barrow10-Dec-13 2:07
professionalKeith Barrow10-Dec-13 2:07 
GeneralRe: List<> VS Dictionary<,> Pin
Ravi Bhavnani12-Dec-13 9:37
professionalRavi Bhavnani12-Dec-13 9:37 
AnswerRe: List<> VS Dictionary<,> Pin
BillWoodruff10-Dec-13 3:23
professionalBillWoodruff10-Dec-13 3:23 
Questionxml in textbox for modifying Pin
Member 94738099-Dec-13 21:56
Member 94738099-Dec-13 21:56 
AnswerRe: xml in textbox for modifying Pin
Marco Bertschi9-Dec-13 22:32
protectorMarco Bertschi9-Dec-13 22:32 
AnswerRe: xml in textbox for modifying Pin
Simon_Whale9-Dec-13 22:50
Simon_Whale9-Dec-13 22:50 
QuestionRe: xml in textbox for modifying Pin
Member 94738099-Dec-13 22:54
Member 94738099-Dec-13 22:54 
AnswerRe: xml in textbox for modifying Pin
Simon_Whale9-Dec-13 22:57
Simon_Whale9-Dec-13 22:57 
QuestionRe: xml in textbox for modifying Pin
Member 94738099-Dec-13 23:49
Member 94738099-Dec-13 23:49 
AnswerRe: xml in textbox for modifying Pin
Simon_Whale9-Dec-13 23:54
Simon_Whale9-Dec-13 23:54 
GeneralRe: xml in textbox for modifying Pin
Member 947380910-Dec-13 2:55
Member 947380910-Dec-13 2:55 
GeneralRe: xml in textbox for modifying Pin
Pete O'Hanlon10-Dec-13 3:52
mvePete O'Hanlon10-Dec-13 3:52 
GeneralRe: xml in textbox for modifying Pin
Member 947380910-Dec-13 4:01
Member 947380910-Dec-13 4:01 
QuestionOpenCV & c#, The type initializer for 'Emgu.CV.CvInvoke' threw an exception. Pin
kawadeprasad9-Dec-13 21:20
kawadeprasad9-Dec-13 21:20 

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.