Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Problem with Set::write and .NET objects' topicStudent Support Forum > General > "Problem with Set::write and .NET objects"

Help | Reply To Topic
Author Comment/Response
09/27/09 3:07pm

I have the following problem:

4 .NET objects are defined in C#. All are of the same type and have a double member and a property that maps to a member, eg.:

public class Test
private double _value;

public double Value
get{return _value;}
set{_value = value;}

In Mathematica, i instantinate 4 objects:

ob1 = NETNew[Test];
ob2 = NETNew[Test];
ob3 = NETNew[Test];
ob4 = NETNew[Test];


And now the problem:

ob[[1]]@Value = 1; //returns an error:

Set::write: "Tag <<NETObject[Test]>> in (<<NETObject[Test]>>)[Value] is Protected"

What to do? I would like to do some analysis on objects and i need to use a table or some sort of a loop.

URL: ,
Help | Reply To Topic