I have this code for searching the first value and I don't know how to use index to delete specific line in the ArrayList nabídka. It should be in other method, or how to add index to return?
public string vyhledavaniOS()
{
foreach (Vozidlo voz in nabídka)
{
if (voz is OsobníVůz)
return (voz.TypVozidla() + ": SPZ: " + voz.JakaSPZ + ", Značka: " + voz.JakaZnacka + ", Barva: " + voz.JakaBarva);
}
}
arraylist.RemoveAt()arralyList.IndexOf. but I'll suggest you to useRemoveinstead of usingRemoveAtto make sure you're removing the correct objectList<T>overArrayList