0

I'm trying to add values to a list containing seven tuples. Whenever I add an item, I get:

System.NullReferenceException: Object reference not set to an instance of an object

error. I'm not sure what's going on.

I create my Tuple List like this in the Public Class:

 Private someListName As List(Of Tuple(Of String, String, String, String, String, String, String))

Inside a timer Tick event (in the same class), I update my list like this:

 someListName.Add(Tuple.Create("a", "b", "c", "d", "e", "f", "g")) 'Add a new tuple to the list

I want this new tuple to be added to the list. I get this error when I create the new item (tuple) in the list. What is the problem?

Samor1922
  • 57
  • 5
  • 2
    `Private someListName As New List(Of Tuple(...))`. Otherwise, you're just defining a Type. – Jimi Jul 28 '21 at 22:04

0 Answers0