Unexpected text (System.Int32[])
<p>I am trying to make a code that computes the hold time and the press/release times of the keys entered through the keyboard.</p>

<pre><code>hold time = keyup(i) - keydown(i+1)
release_press time = keydown(i+1) - keyup(i)
press_press time = keydown(i+1) - keydown(i)
release_release time = keyup(i+1) - keyup(i)
</code></pre>

<p>and this is my code with neither error nor warnings ...but when I run it I get (<code>System.Int32[]</code>) in the text boxes where the hold and press/release times should be exhibited. I don't know why I'm getting an error or where the error is.</p>

<p>Form1.cs</p>

<pre><code>    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Domainnn;
    using Sessionnn;


    namespace TheLatestKS
    {
         public partial class Form1 : Form
{
    Brokerrr b = new Brokerrr();
    public Form1()
    {
        InitializeComponent();
    }

    int i = 0;
    private void timer1_Tick(object sender, EventArgs e)
    {
        i++;
    }

    int[] A=new int[25];
    int[] B=new int[25];
    int[] C=new int[25];
    int[] D=new int[25];
    int[] M=new int[25];
    int[] N=new int[25];
    int[] O=new int[25];
    int[] P=new int[25];

    private void textBox2_KeyDown(object sender, KeyEventArgs e)
    {
        timer1.Enabled = true;

        for (int a = 0; a &lt; textBox2.TextLength; a++)
        {
            timer2.Enabled = true;
            M[a] = k;
            if (a &gt;= 1)
            {
                O[a] = k;
            }
        }
    }

    int j = 0;
    int s = 0;
    float ave = 0;
    private void button1_Click(object sender, EventArgs e)

        {
            timer1.Enabled = false;
            textBox5.Text = i.ToString() + " ms";
            s = s + i;
            Personnn p = new Personnn();
            p.Username = textBox1.Text;
            p.Password = textBox2.Text;
            p.Totaltyping = label5.Text;
            p.Keyduration = textBox3.Text;

            textBox4.Text += textBox2.Text + Environment.NewLine;

            if (j &gt;= 2)
            {
                ave = s / 3;
                textBox6.Text = ave.ToString() + " ms";
            }

            p.Meanoftotal = textBox6.Text;
            p.UDlatency1 = textBox8.Text;
            p.DDlatency1 = textBox9.Text;
            p.UUlatency1 = textBox10.Text;

            b.Insert(p);

            textBox1.Text = " ";
            textBox2.Text = " ";
            textBox3.Text = " ";
            textBox8.Text = " ";
            textBox9.Text = " ";
            textBox10.Text = " ";

            i = 0;

            j++;

        }

    private void textBox1_KeyDown(object sender, KeyEventArgs e)
    {

        if ((e.KeyValue &lt; 65 || e.KeyValue &gt; 122) &amp;&amp; (e.KeyValue != 32) &amp;&amp; (e.KeyValue != 8))
        {
            label7.Text = "Only letters are allowed";


        }

        if (e.KeyValue ==  8)
        {
            label7.Text = " ";
        }
    }

    private void textBox2_KeyUp(object sender, KeyEventArgs e)
    {
        for (int a = 0; a &lt; textBox2.TextLength; a++)
        {
            timer2.Enabled = true;
            N[a] = k;
            if (a &gt;= 1)
            {
                P[a] = k;
            }

        }

        for (int ii = 0; ii &lt;textBox2.TextLength; ii++)
        {
         A[ii] = N[ii] - M[ii];// key duration
        }

        for (int iii = 0; iii &lt; textBox2.TextLength-1; iii++)
        {
         B[iii] = O[iii] - N[iii];//UD latency
         C[iii] = O[iii] - M[iii];//DDlatency
         D[iii] = P[iii] - N[iii];//UU latency
        }

        textBox3.Text = A.ToString();// key duration

        textBox8.Text = B.ToString();// UD latency

        textBox9.Text = C.ToString();// DD latency

        textBox10.Text = D.ToString();// UU latency

    }

    int k = 0;
    private void timer2_Tick(object sender, EventArgs e)
    {
        k++;
    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void label8_Click(object sender, EventArgs e)
    {

    }

}
    }
</code></pre>

<p>Personnn.cs</p>

<pre><code>    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace Domainnn
    {
public class Personnn
{
    int id;

    public int Id
    {
        get { return id; }
        set { id = value; }
    }
    string username;

    public string Username
    {
        get { return username; }
        set { username = value; }
    }
    string password;

    public string Password
    {
        get { return password; }
        set { password = value; }
    }

    string totaltyping;

    public string Totaltyping
    {
        get { return totaltyping; }
        set { totaltyping = value; }
    }

    string meanoftotal;

    public string Meanoftotal
    {
        get { return meanoftotal; }
        set { meanoftotal = value; }
    }

    string keyduration;

    public string Keyduration
    {
        get { return keyduration; }
        set { keyduration = value; }
    }

    string UDlatency;

    public string UDlatency1
    {
        get { return UDlatency; }
        set { UDlatency = value; }
    }
    string DDlatency;

    public string DDlatency1
    {
        get { return DDlatency; }
        set { DDlatency = value; }
    }
    string UUlatency;

    public string UUlatency1
    {
        get { return UUlatency; }
        set { UUlatency = value; }
    }
}
    }
</code></pre>

<p>Brokerrr.cs</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
using Domainnn;

namespace Sessionnn
{
    public class Brokerrr
    {
        OleDbConnection connection;
        OleDbCommand command;

        private void ConnectTo()
        {
            connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\S.M.A.S\Documents\Visual Studio 2010\Projects\TheLatestKS\Databaseee.accdb");
            command = connection.CreateCommand();

        }
        public Brokerrr()
        {
            ConnectTo();
        }

        public void Insert(Personnn p)
        {
            try
            {
                command.CommandText = "INSERT INTO Table1 ([Username], [Password], Totaltyping, Meanoftotal, Keyduration, UDlatency, DDlatency ,UUlatency) VALUES('" + p.Username + "', '" + p.Password + "', '" + p.Totaltyping + "', '"+p.Meanoftotal+"', '"+p.Keyduration+"', '"+p.UDlatency1+"', '"+p.DDlatency1+"', '"+p.UUlatency1+"')";
                command.CommandType = CommandType.Text;
                connection.Open();

                command.ExecuteNonQuery();
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
        }
    }
}
</code></pre>
