i want to include the connection string in a class ....can anybody help me to create a class and to call the class method in a form....

class Connection
{
string connectionString = "your connection string";
 
public string ConnectionString
{
get { return connectionString;}
set { connectionString = value;}
}
}
 
class ConnectionUser
{
public string GetConnectionString()
{
return new Connection().ConnectionString;
}
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.