I wanted to declare a variable like this in AX 2012 : classX[] error = new classX(); in a Class Y
[DataContractAttribute]
public classX
{
}
[DataContractAttribute]
public classY
{
classX[] error = new classX();
}
But I can't declare it, is that possible?
I tried it this way but it didn't work: Array error = Array of classX; classX error[] = new classX();
The proper way to do what you're trying to accomplish is below. Take a look at this link for some more info.
ClassY definition:
ClassX definition: