As already answered, TArray<XXX>
is exactly like any other custom type defined as array of XXX
. In fact, TArray<XXX>
is a custom type defined as array of XXX
.
That said, a custom type defined as array of XXX
is not equivalent to array of XXX
in the context of a procedure or function parameter. In procedure Foo(x: array of Integer)
, x
is an open array parameter, which can accept any type of integer array. In contrast, procedure Foo(x: TArray<Integer>)
takes an actual TArray<Integer>
type only. You can see the difference when attempting to pass a fixed-size array, but also when attempting to pass a TDynIntegerArray
(a different type, also defined as array of Integer
).
So, for variables, sure, if you have array of XXX
, change it to TArray<XXX>
all you want. Just make sure you don't do a global search and replace.