Click here to Skip to main content
15,896,290 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to hide process !!! Pin
Christian Graus26-Apr-09 1:33
protectorChristian Graus26-Apr-09 1:33 
AnswerRe: How to hide process !!! Pin
fly90426-Apr-09 1:37
fly90426-Apr-09 1:37 
GeneralRe: How to hide process !!! Pin
Member 429057725-May-10 20:05
Member 429057725-May-10 20:05 
AnswerRe: How to hide process !!! Pin
harold aptroot26-Apr-09 3:08
harold aptroot26-Apr-09 3:08 
QuestionStruggling to find a suitable data structure Pin
Jastons25-Apr-09 23:20
Jastons25-Apr-09 23:20 
AnswerRe: Struggling to find a suitable data structure Pin
Moreno Airoldi26-Apr-09 0:26
Moreno Airoldi26-Apr-09 0:26 
GeneralRe: Struggling to find a suitable data structure Pin
Jastons26-Apr-09 0:59
Jastons26-Apr-09 0:59 
AnswerRe: Struggling to find a suitable data structure Pin
Gary R. Wheeler26-Apr-09 0:30
Gary R. Wheeler26-Apr-09 0:30 
If you need to keep all of the values, but still be able to retrieve the most recent one for a given key, you could use a List or LinkedList to store all the values and a Dictionary to save the values for a given key, something like this:
public class DataStructure
{
  public void Add(int key,MyObject data)
  {
    DataList.AddTail(new Entry(key,data));
    DataDictionary[key] = data;
  }
  public MyObject Find(key)
  {
    MyObject data = null;
    DataDictionary.TryGetValue(key,out data);
    return data;
  }
  private class Entry
  {
    public Entry(int key,MyObject data)
    {
      Key = key;
      Data = data;
    }
    public int Key;
    public MyObject Data;
  }
  private LinkedList<Entry> DataList = new LinkedList<Entry>();
  private Dictionary<int,MyObject> DataDictionary = new Dictionary<int,MyObject>();
}
Note that I've omitted some things here, like the ability to enumerate the list.

Software Zen: delete this;
Fold With Us![^]

Questionblock the keyboard few keys when my system running on the PC Pin
Ravenet25-Apr-09 23:20
Ravenet25-Apr-09 23:20 
AnswerRe: block the keyboard few keys when my system running on the PC Pin
Christian Graus26-Apr-09 1:34
protectorChristian Graus26-Apr-09 1:34 
GeneralRe: block the keyboard few keys when my system running on the PC Pin
Ravenet26-Apr-09 2:21
Ravenet26-Apr-09 2:21 
QuestionWeb broswer control and Page Content element event in Windows Forms Pin
Ravenet25-Apr-09 22:58
Ravenet25-Apr-09 22:58 
Questionerror:cannot access disposed object Pin
shefa' isied25-Apr-09 22:47
shefa' isied25-Apr-09 22:47 
AnswerRe: error:cannot access disposed object Pin
DaveyM6925-Apr-09 22:53
professionalDaveyM6925-Apr-09 22:53 
AnswerRe: error:cannot access disposed object Pin
Moreno Airoldi26-Apr-09 0:40
Moreno Airoldi26-Apr-09 0:40 
QuestionInstalling Visual Studio.NET 2008......Help needed! Pin
Rajdeep.NET is BACK25-Apr-09 20:20
Rajdeep.NET is BACK25-Apr-09 20:20 
AnswerRe: Installing Visual Studio.NET 2008......Help needed! Pin
DaveyM6925-Apr-09 22:07
professionalDaveyM6925-Apr-09 22:07 
GeneralRe: Installing Visual Studio.NET 2008......Help needed! Pin
Rajdeep.NET is BACK25-Apr-09 23:26
Rajdeep.NET is BACK25-Apr-09 23:26 
GeneralRe: Installing Visual Studio.NET 2008......Help needed! Pin
harold aptroot26-Apr-09 3:05
harold aptroot26-Apr-09 3:05 
Questionuse dll in net2008 Pin
ZAHEDI_HOSSEIN25-Apr-09 19:16
ZAHEDI_HOSSEIN25-Apr-09 19:16 
AnswerRe: use dll in net2008 Pin
DaveyM6925-Apr-09 19:35
professionalDaveyM6925-Apr-09 19:35 
QuestionVideo chat... first one but does it look ok? Pin
Jacob Dixon25-Apr-09 18:25
Jacob Dixon25-Apr-09 18:25 
QuestionImplementing WPF in a Visual C# project........ is it possible? Pin
Rajdeep.NET is BACK25-Apr-09 16:34
Rajdeep.NET is BACK25-Apr-09 16:34 
AnswerRe: Implementing WPF in a Visual C# project........ is it possible? Pin
Sibugathulla25-Apr-09 17:10
professionalSibugathulla25-Apr-09 17:10 
GeneralRe: Implementing WPF in a Visual C# project........ is it possible? Pin
Rajdeep.NET is BACK25-Apr-09 19:58
Rajdeep.NET is BACK25-Apr-09 19:58 

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.