This project has moved and is read-only. For the latest updates, please go here.

Is it possible to disables that JS changes propeties of a object

Jun 24, 2013 at 3:07 AM
Edited Jun 24, 2013 at 3:08 AM
Here is a object student which has some properties.
But the I just want the JS get the value but can not changess the value.

I have used Clone method. so every JS engine access a different copy object. But It seems that I get memory leak.
Jun 24, 2013 at 2:13 PM
Edited Aug 3, 2013 at 3:20 AM

If a property must be publicly writable on the host but read-only for script code, you can do something like this:
// C#
public class Student
    public string Name { get; set; }
Good luck!