fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() {
  5. var array = new string[1, 6] {{"texto", "", "", "", "", ""}};
  6. if (array.ContainsInFirstCol("texto")) WriteLine("achou");
  7. }
  8. }
  9.  
  10. public static class ArrayExt {
  11. public static bool ContainsInFirstCol(this string[,] array, string search) {
  12. for (int row = array.GetLowerBound(0); row <= array.GetUpperBound(0); row++) {
  13. if (array[row, 0].Contains(search)) return true;
  14. }
  15. return false;
  16. }
  17. }
  18.  
  19. //https://pt.stackoverflow.com/q/159207/101
Success #stdin #stdout 0.02s 15696KB
stdin
Standard input is empty
stdout
achou