<p>OK I have an array of tserversocket and am using the tag property to keep track of its index. When an event is fired off such as _clientconnect i am using Index := (Sender as TServerSocket).Tag; but i get an error that highlights that line and tells me its an invalid typecast. What am I doing wrong if all I want to do is get the tag property field? It works with other objects.</p>

Are you sure Sender is the TServerSocket? Isn't the event defined like below:
```
```
procedure TfrmServer.sskServerClientConnect(Sender: TObject; Socket: TCustomWinSocket);
```
```
In which case your code probably should be:
```
```
Index := (Socket as TServerSocket).Tag;
```
```
Have a look at
```
Sender.ClassName
```
to see what Sender really is.