I'm trying to create a method to perform both increment and value assignment operations, something like this:

```
Public Sub ArrayAdd(ByRef arr As Object(), newItem As Object)
        Try
            If IsNothing(arr) Then
                arr = New Object() {newItem}
                Exit Sub
            End If
            Array.Resize(arr, arr.Length + 1)
            arr(arr.Length - 1) = newItem
        Catch ex As Exception
            Throw New ApplicationException(ex.Message, ex)
        End Try
    End Sub`

```

Using this method generates type conversion errors, so I would like to use generics `Of T` (without success).