1
Hello, I am getting an Exception when I run the code below stating that my List<> is out of range. I have tried everything, but without success. How do I solve?
private List<string> conexao;
public Conexao()
{
conexao = new List<string>()
{
[0] = "127.0.0.1",
[1] = "5432",
[2] = "cstdb",
[3] = "postgres",
[4] = "#abc123#"
};
}
Welcome Willian, this answer would help you() Argued tofrangeexception on initialized List
– Luiz Augusto
This is exactly what I needed. Thank you Luiz Augusto.
– Willian Silva
The error is not in this code, put where the error occurs so we can help you
– Maniero