Consultor Eletrônico



Kbase P146426: Automatic casting of .NET array to interface fails with error 361.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/25/2009
Status: Unverified

SYMPTOM(s):

Automatic casting of .NET array to interface fails with error 361

In the manual "OpenEdge Development: GUI for .NET Programming" on page 2-20 is a piece of sample code explaining the explicit use of interface methods, but the lines "rIList = rArray." and "rICollection = rArray." both fails with error 361.

** Only individual array elements are allowed in expressions or on the right-hand-side of non-array assignments. (361)

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.2x

CAUSE:

Bug# OE00182789

FIX:

As a workaround, you can use an explicit cast to cast the object reference to the interface type:

rIList = CAST(rArray,System.Collections.IList).
rICollection = CAST(rArray,System.Collections.ICollection).