+
+ // MS seems to convert arrays into a ReadOnlyCollection
+ if (value is Array) {
+ Array a = (Array)value;
+
+ Type etype = a.GetType ().GetElementType ();
+ CustomAttributeTypedArgument[] new_value = new CustomAttributeTypedArgument [a.GetLength (0)];
+ for (int i = 0; i < new_value.Length; ++i)
+ new_value [i] = new CustomAttributeTypedArgument (etype, a.GetValue (i));
+ this.value = new ReadOnlyCollection <CustomAttributeTypedArgument> (new_value);
+ }