Interesting. Actually, since it's the first time I'm using an object-oriented language (I've "used" Python once, but I don't think that counts), this things of classes, methods, events, they are still a bit messed in my head.
I'm not really worried about it now, because soon I'll have some classes and (hopefully) this mess will be cleared. I just wanted to start coding a little bit using what I know from C and some extra new stuff.
In C, I could do this:
C code:
struct client {
int socket_descriptor;
char[10] name;
struct client *next;
struct client *prev;
}
next and prev were my problem on C#. It's easy with C pointers and I wanted to know if I could do that on C#. After reading that page I'm still not sure, maybe I'll give it a try later. But I bet using ref will be useful when I effectively start coding. Thanks.
And about my program, turns out that I was using RemoveFirst to clean the whole list, so I was able to use a Dictionary and it's method Clean.
In the end, I have a Chat server and client (like chatting online in the 90's
), with some limitations, but I really liked the interface (everything I had coded until now was console-apps). Too bad no one is going to use it