C# Making an function(button) that can read an array number -


I need some help because I am confused. I have to create a button that can read the array of array I created. But my question is how?

My form looks like I have to write a number between 7 - 1006 in search of bar. And then I click on "search" and it should get a number in "index" and write the index number in the index box on the right. So yes, I have to confuse now.

  Using the system; Using System.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Linq; Using System.Text; System usage threading. Task; Using System.Windows.Forms; Nameshavan {public partial class} form 1: form {int [] minare = new int [1000]; Int indogagar = 0; // Pager PA ¥ Index or Public Form 1 () {Initialize Companent (); } Private Zero Form 1_load (Object Sender, EventErgus E) {} Private vide vScrolIndex_Scroll (Object Sender, Scroll EventAgge E) {indPeger = vScrolIndex.Value; TbIndex.Text = indPeger.ToString (); TbIndhold.Text = minArray [Indian] .ostring (); } Private Zero btLinFyld_Click (Object Sender, EventArgs e) {for (int i = 0; i & lt; minArray.Length; i ++) {minArray [i] = i + 7; }} Private zeros tbIndex_TextChanged (object sender, EventArgs e) {} Private Zero Text box1_TextChanged (Object Sender, EventArgs e) {} Private Zero Text Box2_TextChanged (Object Sender, EventArgs e) {} Private Zero btFind_Click (Object Sender, EventArgs e) {} Private Zero tbIndhold_TextChanged (Object Sender, EventArgs E) {}}}    

here Is a solution which gives the first example of the number.

  using the system; Public Class Program {Public Fixed Zero Main () {var number = new [] {1, 1, 5, 1, 1}; Var Results = Array.IndexOf (number, 5); Console.WriteLine (results); }}   

See woorking here:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -