public void Del(Class_str s) { bool k = true; int i; for (i = 0; i < text.Length; i++) { k = true; for (int j = 0; j < text[i].getSize(); j++) { if (s.getChar(j) != text[i].getChar(j)) { k = false; } } if (k) { break; } } if (k == false) { return; } for (long z = i; z < text.Length - 1; ++z) { text[z] = text[z + 1]; } Array.Resize(ref text, text.Length - 1); }
public int HowMany(Class_str s) { int c = 0; for (int i = 0; i < text.Length; i++) { int k = 1; for (int j = 0; j < text[i].getSize(); j++) { if (s.getChar(j) != text[i].getChar(j)) { k = 0; } } c += k; } return(c); }