Click here to Skip to main content
16,005,697 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: problems splitting string Pin
led mike22-Apr-08 8:40
led mike22-Apr-08 8:40 
GeneralRe: problems splitting string Pin
Guffa22-Apr-08 8:46
Guffa22-Apr-08 8:46 
GeneralRe: problems splitting string Pin
stephan_00722-Apr-08 9:56
stephan_00722-Apr-08 9:56 
GeneralRe: problems splitting string Pin
Guffa22-Apr-08 13:27
Guffa22-Apr-08 13:27 
As far as I can tell, the code will work just fine. You don't have to return the array, though. You are changing the items in the array.

void Checkforcolorsign (string[] input) {
  int counter = 0;
  // check for "1" at the end (colorinfo)
  foreach (string s in input) {
    if (s.EndsWith("1")) {
      counter++; 
    }
  }
  // if all elements had a "1" then it is a colorinfo => remove it
  if (counter == input.length) //as many hits as elements {
    for (int i = 0; i < input.length - 1; i++) {
      // remove the last character
      input[i] = input[i].SubString(0, input[i].Length - 1); 
    }
  }
}


Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: problems splitting string Pin
WBurgMo22-Apr-08 9:51
WBurgMo22-Apr-08 9:51 
GeneralRe: problems splitting string Pin
stephan_00722-Apr-08 10:48
stephan_00722-Apr-08 10:48 
GeneralWord plugin - working button Pin
Vodstok22-Apr-08 5:45
Vodstok22-Apr-08 5:45 
GeneralRe: Word plugin - working button Pin
Spacix One22-Apr-08 9:51
Spacix One22-Apr-08 9:51 
General"Remember my password" in a winforms application Pin
benjymous22-Apr-08 5:16
benjymous22-Apr-08 5:16 
GeneralRe: "Remember my password" in a winforms application Pin
led mike22-Apr-08 8:51
led mike22-Apr-08 8:51 
GeneralRe: "Remember my password" in a winforms application Pin
User 665822-Apr-08 8:59
User 665822-Apr-08 8:59 
General[Message Deleted] Pin
gottimukkala22-Apr-08 4:42
gottimukkala22-Apr-08 4:42 
GeneralRe: Wrong board Pin
Blue_Boy22-Apr-08 4:44
Blue_Boy22-Apr-08 4:44 
GeneralSqlParameter problem Pin
Deian22-Apr-08 3:53
Deian22-Apr-08 3:53 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:00
Blue_Boy22-Apr-08 4:00 
GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 4:14
Deian22-Apr-08 4:14 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:26
Blue_Boy22-Apr-08 4:26 
GeneralRe: SqlParameter problem Pin
Deian22-Apr-08 4:27
Deian22-Apr-08 4:27 
GeneralRe: SqlParameter problem Pin
Blue_Boy22-Apr-08 4:33
Blue_Boy22-Apr-08 4:33 
GeneralRe: SqlParameter problem Pin
Colin Angus Mackay22-Apr-08 10:28
Colin Angus Mackay22-Apr-08 10:28 
GeneralRe: SqlParameter problem Pin
Colin Angus Mackay22-Apr-08 10:27
Colin Angus Mackay22-Apr-08 10:27 

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.