Answer the question
In order to leave comments, you need to log in
It is not possible to display the property of the class obtained from the list. How can I do it?
There is a class, I am adding objects of this class to an ArrayList. Then I need to get this object back, let's say by index, and display the class property. It doesn't work for me, it gives an error object does not contain a Name definition, here is part of the code
var NewPasp = new Pasport();
NewPasp.Addd(Nomer, Seria, Family, Name, SecondName);
pasports.Add(NewPasp);
var GetPasp = pasports[0];
Console.WriteLine(GetPasp.Name);// нужно вывести свойство Name объекта из листа pasports
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question