Variable has been used before it has been assigned a value

后端 未结 3 805
离开以前
离开以前 2021-01-21 15:48

I can\'t find the answer to my specific problem anywhere so I figured I\'d open a new question.

I have a program that converts text between ASCII and Binary. It does thi

3条回答
  •  自闭症患者
    2021-01-21 16:28

    You've declared an array, result, but the variable hasn't been assigned an instance of an array, so it's null. You can't add objects to a null array. Perhaps you meant this:

    Dim result(BinarySubstrings.Length) As String
    

    If you aren't sure about the size of result, consider using a List(Of String) as mentioned in the comments.

提交回复
热议问题