Here the my code( Im new to DOT NET)
Im using some socket.connection with port 25.
private readonly byte[] _buffer = new byte[1024];
int structId = BitConverter.ToInt32(_buffer, 0);
Type currentStructType;
if (!Structs.TryGetValue(structId, out currentStructType))
throw new BufferParserException(string.Format("Structure with ID = {0} is not supported.", structId));
here Im getting structId= 540029490 always.
and aboue if condition also FALSE always.means its throwing ex.
I need to get it TRUE.
currentStruct = (IParserStruct)Activator.CreateInstance(currentStructType);
here getting currentStruct = null always.
structLength = BitConverter.ToInt32(_buffer, 4);
if (currentStruct == null || structLength == -1)
throw new BufferParserException("Got to read the structure, but not created.");
Im not getting wts happening here, how to solve this problem.
Please guide me to solve it.