I know a little bit of java, but now I'm venturing into C #, but here's a question: In Java we instantiate an ArrayList like this:
ArrayList<Tipo> nomeArray = new ArrayList<>();
We retrieved a value like this:
nomeArray.get(1).getNome();
And by my testing here with C #, it looks like this:
ArrayList nomeArray = new ArrayList();//Não declara o tipo, estranho
And it looks like it recovers like this:
((Tipo) nomeArray[1]).Nome;//Toda vez que tenho que recuperar tenho que usar um TypeCast?
Is this the right way? Or is it better?