I'm trying to figure out how to get the very last phrase in a commitment exception with nested phrases.
I have a list of exceptions and Ill get the last exception in the list of exceptions as such,
IOrderItem previousException = (IOrderItem)newExceptions[newExceptions.Count-1];
Lets say this returns an exception that has a child phrase, and that child phrase is another exception, and then that child has a phrase that is an exception. How would I get the very last child phrase in this exception with nested child phrases (exceptions)?
I've tried this:
var phrases = exception.GetProperty["Phrases"];
var childException = phrases;
with no such luck. Would you be able to provide an example? Thanks.
Did you cast the "exception.GetProperty["Phrases"];" to an IList so it can be indexed in the next line?