I'm new to C# and may be using this all wrong. but this is the part of my code that I'm having problems with.
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using EntitiesLayer;
namespace DataAccessLayer
{
class DalManager : AbstractDalManager
{
private static DalManager _instance = null;
private static readonly object _lock = new object();
private static readonly string _connectionString = "Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=C:\\Users\\MADDXYZ\\Desktop\\temp_db.mdf;Integrated Security=True;Connect Timeout=30";
DalManager() {
using (SqlConnection sqlCon = new SqlConnection(_connectionString))
{
}
}
....
And this is an image of the Errors I'm having
NOTE : when I remove
using
I get no errors.
I have looked up on the internet but without success , anyone can Help please?