Sometimes the marshaler requires move than just the managed and unmanaged data format. The MarshalAs attribute also allows you specify this additional information. For example, in order to marshal an array the marshaling service must also know the element type, rank, size and bounds of the array.