Can some one help me with the code snippet to connect to ADO.Net DB connection from C# script task? When I parameterize the connection string using a package level variable, it appears that the DBConnection is not evaluated and hence shows with a red arrow mark as shown below.

Also, when I double click on the connection and click on 'Test Connection' button, I am getting the below error message.

I am not finding any examples of C# script task that is connecting to ADO.Net DB Connection using variables for the connection string. Can someone help?