I would like to answer on your aproach of readonly.
Readonly isn't a way to have only a get accessor on a public field. I mainly use readonly on private field where my private field can only be set from constructor. So to be understand a readonly field can ONLY be set in a contructor and then you can only acess it.
The best practices is to always use Properties to access your fields after constructor. so in case you would have to access your properties from inside your class I would put :
private readonly int result;
private readonly int message;
public Result(bool result, string message)
{
this.result = result;
this.message = message;
}
public int Result
{
get{ return result; }
private set { result = value; }
}
public int Message
{
get{ return message; }
private set { message = value; }
}
That way you can only read Result and Message and can still write to it from inside the class.
In case you use inheritance, you could put the set protected if needed.
EDIT: After reading the code I made based on what was given in the question there is some bug where the Class name Result will probably throw an error with the property Result and also the fact the we are receiving a bool as result and a string as message in constructor but trying to send them in a int this will definatly don't work. But for what it's worth here is something mor logic :
private readonly bool result;
private readonly string message;
public Answer(bool result, string message)
{
this.result = result;
this.message = message;
}
public bool Result
{
get{ return result; }
private set { result = value; }
}
public string Message
{
get{ return message; }
private set { message = value; }
}