Hi
public class Common
{
public Common()
{
public static string connectionString = ConfigurationManager.ConnectionStrings["Cnn"].ConnectionString;
}
}
Thanks
Hi
public class Common
{
public Common()
{
public static string connectionString = ConfigurationManager.ConnectionStrings["Cnn"].ConnectionString;
}
}
Thanks
You are not following proper C# syntax and you did not explain what you are trying to do. I assume you want the following pattern.
public class Common
{
public string connectionString { get; set; }
public Common()
{
connectionString = ConfigurationManager.ConnectionStrings["Cnn"].ConnectionString;
}
}
Hi @JagjitSaini-0360 ,
In order to better help you, can you explain your needs and what needs to be done?
Turning on the structure guide lines will help with the bracket alinement.
https://dailydotnettips.com/turning-onoff-structure-guide-lines-in-visual-studio-2017/
https://dailydotnettips.com/how-to-customize-structure-guide-lines-colors-in-visual-studio-2017/
4 people are following this question.