Witam, mam problem z napisaniem impelemtacji listy w c#. Mianowicie w C/C++ latwo by sie to zrobillo
class Element{
int val;
Element next;
...}
class List
{
Element* first;
...
}
a w c# jak chce zrobic cos podobnego za pomoca 'ref' to mi podkresla ze cos zle jest.
konkretnie to juz w takim czyms mi podkresla 'ref'
class Element
{
int value;
Element next;
}
class List
{
ref Element head;
}
moglby mi ktos wytluamczyc co robie zle??