Suppose I have a class in SilverLight:
public class GenericClass {
public string filedOne = "field one";
public string filedTwo = "field two";
}
And I want to pass an instance of it to JavaScript to access in the following way:
function callback(obj) {
console.log(obj.fieldOne);
}
Is this possible without serializing to JSON and back?
UPDATE:
I know how to pass primitive values - that's not a problem. I need to pass an object with several fields.