Question about StackTrace in PropertyHasChanged FunctionQuestion about StackTrace in PropertyHasChanged Function
Old forum URL: forums.lhotka.net/forums/t/1022.aspx
mr_lasseter posted on Friday, August 25, 2006
How can you be sure that the using the StackTrace to determine which proeprty has changed on a business method? From reading on msdn, I thought that waht gets written to the Stack is not always the same depending on what type of build you are doing (Debug vs Release). Any information would be greatly appreciated.
Thanks in advance.
Mike Lasseter
ajj3085 replied on Friday, August 25, 2006
The reason its not always reliable is because release may do some optimizations, like inlining.
We can be sure that the StackTrace works, because a bug was discovered, and you can disable inlining via the use of an attribute. Rocky applied this attribute, which gives us predicable behavior.
You can search the forum for more details.. Rocky may have a blog about this as well, not sure.
HTH
Andy
dean replied on Friday, August 25, 2006
Conversely you can use the PropertyHasChanged(PropertyName) overload which is more efficient and avoids the use of StackTrace.
Dean.
Copyright (c) Marimer LLC