c# - How to call a file for picturebox -


i have form 6 arrays, 15 elements each. wrote them in way if search myself (being 1st element in string[] name array), form load 1st element of every array: age, gender, hobby, photo etc. here part of picturebox code i'm using

//i have more arrays here, like: name,gender,age,hobby,place & talent string[] photo=new string[] { "764.jpg", " 765.jpg", " 766.jpg", " 767.jpg"," 765.jpg", " 767.jpg", " 768.jpg", " 769.jpg", " 770.jpg", " 771.jpg",  " 772.jpg", " 773.jpg", " 774.jpg", " 775.jpg", " 776.jpg"};  string name="",gender="",place="",warning=""; int age = 0; string image="";  (int = 0; < 15; i++)         {             if (textbox6.text == emri[i])                   {                       //i applied every element of every array declared variables                       image = photo[i];                       j++;                   }             if (j == 1)                   {                        //associated textboxes variables                        picturebox1.image = image.fromfile(@"c:\users\ncomputers\documents\visual studio 2015\projects\windowsformsapplication1\windowsformsapplication1\bin\debug\sony xperia\" + image);                    }             else                   {                         messagebox.show("person not found!");                    } 

while there no errors shown, picture doesn't load. other items working. help?


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -