I am having a problem creating an object and setting/getting the values. The purpose of this is to return data from a Model to a Controller.
Disclaimer: Im new to C#
Can anyone show me the right way to do it?
I have tried these ways but I keep getting the error:
object o = new { test = "cat" };
o.test = "dog";
Object o = new { test = "cat" };
o.test = "dog";
object o = new Object();
o.test = "dog";
// I also tried
object o = new Object();
o["test"] = "dog";