Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute22-May-09 10:12
Henry Minute22-May-09 10:12 
GeneralRe: Multiple forms and datagridviews Pin
bwood202022-May-09 10:19
bwood202022-May-09 10:19 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 4:08
bwood202026-May-09 4:08 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 4:15
Henry Minute26-May-09 4:15 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 6:13
bwood202026-May-09 6:13 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 6:20
Henry Minute26-May-09 6:20 
GeneralRe: Multiple forms and datagridviews Pin
bwood202026-May-09 12:47
bwood202026-May-09 12:47 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 13:11
Henry Minute26-May-09 13:11 
I keep forgetting that you are using VS2005.

Slight modification:
<pre>
     public class FieldMappingDictionary : Dictionary<string, List<string>>
     {
          public void Add(string key, string value)
          {
               // if the key is already in the list
               if (this.KeysContains(key)) // <================= Modified Line
               {
                    // only do it if not already there
                    if (!base[key].Contains(value))
                    {
                         // add the new value
                         base[key].Add(value);
                    }
               }
               else
               {
                    // if the key ain't there, add it and a new values list
                    List<string> list = new List<string>();
                    list.Add(value);
                    base.Add(key, list);
               }
          }

          public bool KeysContains(string key) // <=========== New Method, just iterates over keys collection, returns true if found
          {
               bool result = false;

               foreach (string s in base.Keys)
               {
                    if (s == key)
                    {
                         result = true;
                         break;
                    }
               }

               return result;
          }
     }
</pre>

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: Multiple forms and datagridviews Pin
Henry Minute26-May-09 13:18
Henry Minute26-May-09 13:18 
GeneralRe: Multiple forms and datagridviews [modified] Pin
bwood202027-May-09 5:44
bwood202027-May-09 5:44 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 7:20
Henry Minute27-May-09 7:20 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 10:41
Henry Minute27-May-09 10:41 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 11:39
Henry Minute27-May-09 11:39 
GeneralRe: Multiple forms and datagridviews Pin
bwood202027-May-09 12:18
bwood202027-May-09 12:18 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 12:29
Henry Minute27-May-09 12:29 
GeneralRe: Multiple forms and datagridviews Pin
Henry Minute27-May-09 12:35
Henry Minute27-May-09 12:35 
GeneralRe: Multiple forms and datagridviews Pin
bwood202027-May-09 13:02
bwood202027-May-09 13:02 
GeneralRe: Multiple forms and datagridviews Pin
bwood202029-May-09 5:27
bwood202029-May-09 5:27 
GeneralRe: Multiple forms and datagridviews Pin
bwood202018-Jun-09 12:06
bwood202018-Jun-09 12:06 
QuestionCheck if frame in webclient is done loading Pin
Member 441789215-May-09 4:25
Member 441789215-May-09 4:25 
Questionposting data to remote URL using WebBrowser Pin
shabya15-May-09 2:49
shabya15-May-09 2:49 
QuestionConvert EBCDIC to ASCII and vice versa Pin
deep715-May-09 2:15
deep715-May-09 2:15 
AnswerRe: Convert EBCDIC to ASCII and vice versa Pin
OriginalGriff15-May-09 2:23
mveOriginalGriff15-May-09 2:23 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
deep715-May-09 2:39
deep715-May-09 2:39 
GeneralRe: Convert EBCDIC to ASCII and vice versa Pin
Alan Balkany15-May-09 3:31
Alan Balkany15-May-09 3:31 

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.