Where to insert namespace in C#

Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc used Ask the Experts™
on
Hi

Experts C#

Help me how to add a namespace to my existing project in C#. I want to add this new namespace :

namespace autocomplete_controls_csharp

Where do I insert the above name space ,the idea here is that I want to auto complete the combo box on my form instead of using a button to fill it in, those who have experience with MS access will agree with me that once a combo box is set the data is also auto filled in. Below is my simple project:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Accounting
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(@"Data Source=USER\SQLEXPRESS; Initial Catalog=CaPremier; Integrated Security=true; User ID=user\admini");
            con.Open();
            SqlCommand cmdinsert = new SqlCommand("Insert into Customers values('" + txtCustomerID.Text + "', '" + txtCustomer.Text + " ','" + txtAddress.Text + "' )", con);
            cmdinsert.CommandType = CommandType.Text;
            cmdinsert.ExecuteNonQuery();
            con.Close();
            MessageBox.Show("Data Inserted");
        }
    }
}
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Freelance programmer / Consultant
Commented:
Just add the following
using autocomplete_controls_csharp;
somewhere at the top of your file.

eg.
using System.Data.SqlClient;
using autocomplete_controls_csharp;
namespace Accounting

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial