Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 10:05
michael nabil21-May-21 10:05 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 10:31
mveOriginalGriff21-May-21 10:31 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil21-May-21 10:55
michael nabil21-May-21 10:55 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff21-May-21 11:38
mveOriginalGriff21-May-21 11:38 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
michael nabil22-May-21 9:53
michael nabil22-May-21 9:53 
GeneralRe: Multidimensional Arrays error in fill IList Interface Pin
OriginalGriff22-May-21 10:01
mveOriginalGriff22-May-21 10:01 
AnswerRe: Multidimensional Arrays error in fill IList Interface Pin
Eddy Vluggen21-May-21 12:01
professionalEddy Vluggen21-May-21 12:01 
QuestionWhy dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 20:26
Alex Dunlop19-May-21 20:26 
Hi
C#
{
           if (DataGridView2.Rows.Count != 0 && !string.IsNullOrEmpty(column_num.Text) && !string.IsNullOrEmpty(row_num.Text) && !string.IsNullOrEmpty(Equip_column.Text) && !string.IsNullOrEmpty(prog_num.Text))
           {
               for (int i = Convert.ToInt32(row_num.Text); i < DataGridView2.Rows.Count; i++)
               {
                   if (!code_dic.ContainsKey(DataGridView2.Rows[i].Cells[Convert.ToInt32(column_num.Text)].Value.ToString()))
                   {
                       code_dic.Add(DataGridView2.Rows[i].Cells[Convert.ToInt32(column_num.Text)].Value.ToString(), string.Join(",", DataGridView2.Rows[i].Cells[Convert.ToInt32(Equip_column.Text)].Value.ToString(), prog_num.Text.ToString()));
                   }
               }
           }

           foreach (KeyValuePair<string, string> pair in code_dic)
           {
               string[] my_arr = pair.ToString().Split(',');
               my_table_code.Rows.Add(my_arr[0], my_arr[1], my_arr[2]);
               DataGridView3.DataSource = my_table_code;
           }
       }

In the code above, dictionary puts information inside [ ] mark.
The output shows information like this:
[abc,def,ghi]
I want to omit [ ] marks. What to do?
QuestionRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 21:00
mveRichard MacCutchan19-May-21 21:00 
AnswerRe: Why dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 21:04
Alex Dunlop19-May-21 21:04 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 21:38
mveRichard MacCutchan19-May-21 21:38 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan19-May-21 22:08
mveRichard MacCutchan19-May-21 22:08 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Alex Dunlop19-May-21 22:46
Alex Dunlop19-May-21 22:46 
GeneralRe: Why dictionary puts data inside [] mark? Pin
jsc4219-May-21 23:58
professionaljsc4219-May-21 23:58 
GeneralRe: Why dictionary puts data inside [] mark? Pin
Richard MacCutchan20-May-21 0:50
mveRichard MacCutchan20-May-21 0:50 
AnswerRe: Why dictionary puts data inside [] mark? Pin
BillWoodruff30-May-21 21:05
professionalBillWoodruff30-May-21 21:05 
QuestionGet folders like the one for mega, drop box Pin
Duc Axenn19-May-21 11:35
Duc Axenn19-May-21 11:35 
AnswerRe: Get folders like the one for mega, drop box Pin
Dave Kreskowiak19-May-21 11:58
mveDave Kreskowiak19-May-21 11:58 
GeneralRe: Get folders like the one for mega, drop box Pin
Duc Axenn19-May-21 13:45
Duc Axenn19-May-21 13:45 
GeneralRe: Get folders like the one for mega, drop box Pin
Dave Kreskowiak19-May-21 14:34
mveDave Kreskowiak19-May-21 14:34 
GeneralRe: Get folders like the one for mega, drop box Pin
Duc Axenn19-May-21 21:27
Duc Axenn19-May-21 21:27 
QuestionIs ILMerge still used ? Pin
Maximilien19-May-21 9:05
Maximilien19-May-21 9:05 
AnswerRe: Is ILMerge still used ? Pin
Dave Kreskowiak19-May-21 9:48
mveDave Kreskowiak19-May-21 9:48 
QuestionString.Replace() & Regex.Replace() not working Pin
Mou_kol15-May-21 22:40
Mou_kol15-May-21 22:40 
GeneralRe: String.Replace() & Regex.Replace() not working Pin
Tony Hill15-May-21 23:30
mveTony Hill15-May-21 23:30 

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.