Dictionary Values() Convert to MyClass()

I store objects of type MyClass as values in a dictionary keyed by an ID.

Why can’t an array of variants be converted to an array of MyClass, like this:

Dim MyObjArray() as MyClass MyObjArray() = dict.Values

Am I doing something wrong?

However, converting one at a time works fine:

  Dim values() as variant
  Dim MyObjItem as MyClass
  
  values() = dict.Values
  for each v as Variant in values
    MyObjItem = v
  next v

Thank you

xojo doesn’t allow to assign an array of variant to an array of MyClass.
You can fill a feature request for changing that.