Click here to Skip to main content
15,905,508 members
Home / Discussions / C#
   

C#

 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 9:35
dennycrane22-Apr-08 9:35 
GeneralRe: Comparing two ArrayLists ? Pin
User 665822-Apr-08 9:49
User 665822-Apr-08 9:49 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 10:43
Guffa22-Apr-08 10:43 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 10:57
dennycrane22-Apr-08 10:57 
GeneralRe: Comparing two ArrayLists ? Pin
Christian Graus22-Apr-08 12:06
protectorChristian Graus22-Apr-08 12:06 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 12:12
Guffa22-Apr-08 12:12 
AnswerRe: Comparing two ArrayLists ? Pin
Judah Gabriel Himango22-Apr-08 11:52
sponsorJudah Gabriel Himango22-Apr-08 11:52 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:25
dennycrane22-Apr-08 12:25 
so this is what I have

don´t I need a list to compare though?

private void button1_Click(object sender, EventArgs e)
       {

           AthugaStafset();
           ContainsSameElements(first, second);

       }

       public void ChkSpell()
       {

           string[] correctlySpelledWords = { "foo", "bar", "bat", "baz" };
           string[] studentSpelledWords = richTextBox1.Text.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
           bool studentSpelledEverythingCorrectly = ContainsSameElements(correctlySpelledWords, studentSpelledWords);

           if (studentSpelledEverythingCorrectly)
           {
               label1.Text = "Same";
           }
           else
           {
               label1.Text = "They differ";

           }

       }

       public bool ContainsSameElements(string[] first, string[] second)
       {
           if (first.Length != second.Length)
           {
               return false;
           }

           for (int i = 0; i < first.Length; i++)
           {
               if (!string.Equals(first, second, StringComparison.InvariantCultureIgnoreCase))
               {
                   return false;
               }
           }

           return true;

GeneralRe: Comparing two ArrayLists ? Pin
Judah Gabriel Himango22-Apr-08 18:55
sponsorJudah Gabriel Himango22-Apr-08 18:55 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 12:14
professionalAnthony Mushrow22-Apr-08 12:14 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:40
dennycrane22-Apr-08 12:40 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 12:44
professionalAnthony Mushrow22-Apr-08 12:44 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 12:55
dennycrane22-Apr-08 12:55 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 13:01
professionalAnthony Mushrow22-Apr-08 13:01 
GeneralRe: Comparing two ArrayLists ? Pin
Guffa22-Apr-08 13:16
Guffa22-Apr-08 13:16 
GeneralRe: Comparing two ArrayLists ? Pin
Anthony Mushrow22-Apr-08 13:24
professionalAnthony Mushrow22-Apr-08 13:24 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 13:39
dennycrane22-Apr-08 13:39 
GeneralRe: Comparing two ArrayLists ? Pin
dennycrane22-Apr-08 13:32
dennycrane22-Apr-08 13:32 
GeneralOk, im confused. Pin
Anthony Mushrow22-Apr-08 13:37
professionalAnthony Mushrow22-Apr-08 13:37 
GeneralRe: Ok, im confused. Pin
dennycrane22-Apr-08 14:36
dennycrane22-Apr-08 14:36 
QuestionHow i can block the incomming network traffic using C# .NET Pin
Tahir Abbasi22-Apr-08 8:16
Tahir Abbasi22-Apr-08 8:16 
AnswerRepost ignore Pin
led mike22-Apr-08 8:39
led mike22-Apr-08 8:39 
AnswerRe: How i can block the incomming network traffic using C# .NET Pin
Pete O'Hanlon22-Apr-08 8:49
mvePete O'Hanlon22-Apr-08 8:49 
GeneralRe: How i can block the incomming network traffic using C# .NET Pin
Paul Conrad22-Apr-08 15:28
professionalPaul Conrad22-Apr-08 15:28 
Generalproblems splitting string Pin
stephan_00722-Apr-08 7:55
stephan_00722-Apr-08 7:55 

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.