How do we compare the error byte we get for connections?

Hi

I saw simple code example in the LLAPI and wondered how to actually read/compare the error code?

I have currently:

NetworkTransport.Connect(HostID, "127.0.0.1", port, 0, out error);
            if (error != NetworkError.Ok)
            {
                // display error
            }

Do i have to cast it or is there some other approach involved?

Never mind solved it. Had to cast.