Why does this code not give me the right output? I am expecting the output to be decomptxt = aa".
I typed in 02a (RLEText)" "Function 'Compressdata' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is used."
Expected result: decomptxt = aa
This is my code:
x = 0
For i As Integer = 1 To Len(RLEText)
Dim st As String = RLEText
NoChars = st.Substring(x, 2)
Chars = st.Substring(x + 2, 1)
decomptxt = String.Join("", Enumerable.Repeat(Chars, NoChars))
Return decomptxt
x = x + 3