I have created an object with a boolean property and a collection.
what I do:
I have a method that gets called when on post which in turn calls another method that returns an object. my problem is that I don't get the object properties.
public object methodThatReturnsAnObject(string a, string b)
{
object data = new {isSaved = false, personsToCredit = ""}
// perform my code and if all is valid i set values to my object properties and return the object
data = new {isSaved = valid, personsToCredit = persons }
return data;
}
My other method:
object Information = methodThatReturnsAnObject(string a, string b);
whats my problem?
When I debug the Information
object contains the two properties that I want to get my hands on BUT when I type Information.isSaved
it says that information does not contain a definition for isSaved
?