visual c++ - C# Array, String, error -
int i; int [,] prices = new int [2, 7]{{1,2,3,4,5,6,7},{700,600,500,400,300,200,100}}; string[,] city = new string [2,1]{{"a"},{"b"}}; bool found = false; (i = 0; <= city.length -1; i++) // (y = 0; y <= city.length - 1; y++) { if (lstdestinationcity.text == city[i]) <<-- error here { im planing program if select city first row if b city 2 row
i think that's because city[i] "don't contain anything" should check city[i,0]
if (lstdestinationcity.text == city[i,0])// should access first element text looking
Comments
Post a Comment