Hi all
I have a code for .NET Compact 2.0:
if (elementType.GetProperty("Items") != null)
{
Type itemsType =
elementType.GetProperty("Items").PropertyType;
object itemsObj =
elementType.InvokeMember("Items",
BindingFlags.Instance |
BindingFlags.DeclaredOnly |
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.GetProperty,
null,
formControls[ArrayPosition][currElement], null);
foreach (XmlNode item in
element.FirstChild.ChildNodes)
{
itemsType.InvokeMember("Add",
BindingFlags.Instance |
BindingFlags.Public |
BindingFlags.InvokeMethod,
null, itemsObj, new
Object[] { item.FirstChild.Value });
}
}
The row elementType.InvokeMember(...) throws a NotSupportedException.
Same code for regular .NET works fine.
Does it mean .NET Compact 2.0 doesn't support such invocation at all?