Object reference Not set to the instance of an object.


Oct 31, 2016
Programming Experience
I reliazed LZW algorithm.LZW algorithm has 2 method CompressLZW DecompressLZW.When you compress which returns list<int> and the program saved list<int> as a text.Decompressing method working like this.Read text by the streamreader.Then convert the string to list<string> then convert the list<string> to list<int> because decompressLZW takes list<int> and which returns String.When ı decompress this eror occured there? ttt.jpg
So, which reference on that line is null? If I had to guess, I'd say 'entry'. You set it to null and never change it if one of the two conditions you check isn't true.
I'm asking a question. You're supposed to provide an answer. What reference on that line is null when the exception is thrown? Is it 'entry'? If that is the case then there is a fault in your logic so you need to go back and review it.
Top Bottom