title: Error: Cannot implicitly convert type 'string' to 'string[]
body: <p>sorry for my bad English.</p>
  
  <p>I am having problems when it comes to passing values from my Windows form to the class definition I made. </p>
  
  <p>I have declared seven arrays in my class definition in an attempt to store the values passed from the said windows form. My problem is that I am constantly getting an error like</p>
  
  <p><code>Cannot implicitly convert type 'string' to 'string[]'</code></p>
  
  <p>I have tried to get an idea on another work that was give to me but it seems that it is still throwing errors on my work.</p>
  
  <p>Here is my class definition:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace BankTransaction
  {
  
  public class Transactions
  {
      String username, password;
      decimal deposit, withdrawal, balance;
      decimal percentInterest;
      private decimal projectedInterest;
      private String uname;
      public string fName, lName, mInitial, pword, actType, uName;
      const Int64 MAX_SIZE = Int64.MaxValue;
  
      public static String[] firstName = new String [MAX_SIZE];
      public static String[] lastName = new String[MAX_SIZE];
      public static String[] mi = new String[MAX_SIZE];
      public static String[] pass = new String[MAX_SIZE];
      public static String[] userName = new String[MAX_SIZE];
      public static String[] accountType = new String[MAX_SIZE];
      public static decimal[] deposito = new decimal[MAX_SIZE];
      static int count = 0;
      public static int that;
      public static int number = 10001;
  
      public void registerLoginDetails()
      {
          firstName[count] = fName;
          lastName[count] = lName;
          mi[count] = mInitial;
          pass[count] = pword;
          accountType[count] = actType;
          userName[count] = uName;
          deposito[count] = deposit;
          count++;
          number++;
      }
  
      public decimal computeProjectedInterest(decimal initialBalance, decimal numOfYears)
      {
  
          if (numOfYears &lt; 1)
          {
              percentInterest = 0.00m;
          }
  
          if (numOfYears &gt; 0 &amp;&amp; numOfYears &lt;= 3)
          {
              percentInterest = 0.02m;
          }
  
          if (numOfYears &gt; 3 &amp;&amp; numOfYears &lt;= 5)
          {
              percentInterest = 0.05m;
          }
  
          if (numOfYears &gt; 5 &amp;&amp; numOfYears &lt;=10)
          {
              percentInterest = 0.08m;
          }
  
          if (numOfYears &gt; 10)
          {
              percentInterest = 0.12m;
          }
  
          projectedInterest = initialBalance * percentInterest * numOfYears;
          return projectedInterest;
      }
  
      public decimal withdrawBalance()
      {
          return 0m;
      }
  
      public decimal depositBalance()
      {
          return 0m;
      }
  }
  }
  </code></pre>
  
  <p>And here is my code for the said WinForm:</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 BankTransaction;
  
  namespace LabExam1
  {
  public partial class Registration : Form
  {
  
      const long size = Int64.MaxValue;
      public static Transactions trans = new Transactions();
      int i = 0;
  
      public void confirmRegistration()
      {
  
          Transactions.firstName = txtFname.Text;
          Transactions.lastName = txtLname.Text;
          Transactions.mi = txtMi.Text;
          Transactions.pass = txtPass.Text;
          Transactions.deposito = nudDeposit.Value;
          Transactions.accountType = cboType.Text;
          Transactions.userName = "";
          trans.registerLoginDetails();
          i++;
  
  
          this.Hide();
          Login lo = new Login();
          lo.ShowDialog();
      }
  
      public Registration()
      {
          InitializeComponent();
      }
  
      private void Form1_Load(object sender, EventArgs e)
      {
          cboType.SelectedIndex = 0;
      }
  
      private void btnRegister_Click(object sender, EventArgs e)
      {
          if (txtFname.Text == "" || txtLname.Text == "" || txtMi.Text == "" || txtPass.Text == "")
          {
              MessageBox.Show("Please fill up all required fields!", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning);
          }
          else
          {
              if (cboType.SelectedIndex == 0)
              {
                  confirmRegistration();
              }
  
              if (cboType.SelectedIndex == 1)
              {
                  if (nudDeposit.Value &lt; 2500.00m)
                  {
                      MessageBox.Show("The initial deposit for your account type is insufficient", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                  }
  
                  else
                  {
                      confirmRegistration();
                  }
              }
  
              if (cboType.SelectedIndex == 2)
              {
                  if (nudDeposit.Value &lt; 3000.00m)
                  {
                      MessageBox.Show("The initial deposit for your account type is insufficient", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                  }
  
                  else
                  {
                      confirmRegistration();
                  }
              }
          }
  
  
      }
  
      private void btnExit_Click(object sender, EventArgs e)
      {
          Application.Exit();
      }
  
      private void btnGotoLogin_Click(object sender, EventArgs e)
      {
          this.Hide();
          Login lo = new Login();
          lo.ShowDialog();
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks in advance to everyone that will answer my question.</p>