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

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -