About .NET, ASP.NET, MVC, C#, WPF, WCF and everything related to .NET and more.

Tag: AOP

When using usual C# events, registering an event handler creates a strong reference from the event source to the listening object. If the source object has a longer lifetime than the listener, and if the listener no longer needed (there are no other references), to avoid memory leak the listener object must unsubscribe from the source event, if it does not, the use normal .NET events causes a memory leak.
There are lots of different approaches to resolve this problem. This article will explain some of them and discuss their advantages and disadvantages. Read more →

Sometimes we need to have access to non-public members. However, if you try to do this via reflection in Silverlight, you get something like this:
Attempt by method 'method name' to access method 'member name' failed. Read more →