Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: treeview allowdrop property not there Pin
CrimeanTurtle20084-Jan-10 13:42
CrimeanTurtle20084-Jan-10 13:42 
GeneralRe: treeview allowdrop property not there Pin
Mycroft Holmes4-Jan-10 14:01
professionalMycroft Holmes4-Jan-10 14:01 
GeneralRe: treeview allowdrop property not there Pin
CrimeanTurtle20084-Jan-10 14:20
CrimeanTurtle20084-Jan-10 14:20 
QuestionMovie from bmp files. bmp to tiff, mp4, or other formats Pin
ThorTheBraveGod4-Jan-10 8:43
ThorTheBraveGod4-Jan-10 8:43 
AnswerRe: Movie from bmp files. bmp to tiff, mp4, or other formats Pin
Migounette4-Jan-10 22:29
Migounette4-Jan-10 22:29 
GeneralRe: Movie from bmp files. bmp to tiff, mp4, or other formats Pin
ThorTheBraveGod5-Jan-10 6:32
ThorTheBraveGod5-Jan-10 6:32 
QuestionSliding Forms in windows mobile Pin
mahmoud ankeer4-Jan-10 7:14
mahmoud ankeer4-Jan-10 7:14 
QuestionRemoving values in a dictionary [modified] Pin
Paul Harsent4-Jan-10 4:55
Paul Harsent4-Jan-10 4:55 
I have a dictionary call timeDate. where DriveDT is an object.
static Dictionary<string, DriveDT> timeDate = new Dictionary<string, DriveDT>();

I want to remove the value from the dictionary, the line im using is in the section else //unload

But the line isnt working.
timeDate.Remove(key);

private static void extractSE(string filePath)
        {
            StreamReader textIn = new StreamReader(filePath);

            do
            {
                string text = textIn.ReadLine();

                bool mail = text.Contains("Mail");

               if(!mail)
                {
                if ((text != ""))
                {
                        int indexofTO = text.IndexOf("to");
                        int indexofSLOT = text.IndexOf("Slot");


                        if (indexofSLOT < indexofTO) //load
                        {
                            int indexofInfo = text.IndexOf("Info");
                            string dtTxt = text.Substring(0, (indexofInfo - 1));
                            DateTime dt = DateTime.Parse(dtTxt);
                            string data = text.Substring(indexofInfo);
                            string key = text.Substring(indexofSLOT, (indexofTO - indexofSLOT - 1));
                            timeDate.Add(key, new DriveDT(dt, data));

                        }
                        else //unload
                        {
                            string key = text.Substring((indexofTO + 2));
                            

                            timeDate.Remove(key);
                        } 
                }
                }
            }
            while (!textIn.EndOfStream);

        }


modified on Monday, January 4, 2010 11:30 AM

AnswerRe: Removing values in a dictionary Pin
Luc Pattyn4-Jan-10 5:12
sitebuilderLuc Pattyn4-Jan-10 5:12 
AnswerRe: Removing values in a dictionary Pin
OriginalGriff4-Jan-10 5:27
mveOriginalGriff4-Jan-10 5:27 
GeneralRe: Removing values in a dictionary Pin
Paul Harsent4-Jan-10 5:32
Paul Harsent4-Jan-10 5:32 
GeneralRe: Removing values in a dictionary Pin
Luc Pattyn4-Jan-10 5:32
sitebuilderLuc Pattyn4-Jan-10 5:32 
AnswerRe: Removing values in a dictionary [modified] Pin
Luc Pattyn4-Jan-10 5:41
sitebuilderLuc Pattyn4-Jan-10 5:41 
AnswerRe: Removing values in a dictionary Pin
#realJSOP4-Jan-10 5:41
mve#realJSOP4-Jan-10 5:41 
GeneralRe: Removing values in a dictionary Pin
Paul Harsent4-Jan-10 5:51
Paul Harsent4-Jan-10 5:51 
GeneralRe: Removing values in a dictionary Pin
#realJSOP4-Jan-10 6:11
mve#realJSOP4-Jan-10 6:11 
GeneralRe: Removing values in a dictionary Pin
Paul Harsent4-Jan-10 6:17
Paul Harsent4-Jan-10 6:17 
GeneralRe: Removing values in a dictionary Pin
Luc Pattyn4-Jan-10 6:50
sitebuilderLuc Pattyn4-Jan-10 6:50 
AnswerRe: Removing values in a dictionary Pin
David Skelly4-Jan-10 5:56
David Skelly4-Jan-10 5:56 
GeneralRe: Removing values in a dictionary Pin
Paul Harsent4-Jan-10 6:00
Paul Harsent4-Jan-10 6:00 
GeneralRe: Removing values in a dictionary Pin
David Skelly4-Jan-10 6:17
David Skelly4-Jan-10 6:17 
GeneralRe: Removing values in a dictionary Pin
Paul Harsent4-Jan-10 22:21
Paul Harsent4-Jan-10 22:21 
GeneralRe: Removing values in a dictionary Pin
Ben Fair4-Jan-10 6:36
Ben Fair4-Jan-10 6:36 
QuestionIs there a way to get a list of all exceptions that can be thrown by a program.... Pin
edaindia4-Jan-10 4:40
edaindia4-Jan-10 4:40 
AnswerRe: Is there a way to get a list of all exceptions that can be thrown by a program.... Pin
JasonLee074-Jan-10 4:50
JasonLee074-Jan-10 4:50 

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.