Microsoft Silverlight will reach end of support after October 2021. Learn more.
Returns a value that indicates whether the loader resolves two assembly names to the same assembly.
Assembly: mscorlib (in mscorlib.dll)
'Declaration <SecuritySafeCriticalAttribute> _ Public Shared Function ReferenceMatchesDefinition ( _ reference As AssemblyName, _ definition As AssemblyName _ ) As Boolean
[SecuritySafeCriticalAttribute] public static bool ReferenceMatchesDefinition( AssemblyName reference, AssemblyName definition )
The reference assembly name.
The assembly name that is compared to the reference assembly.
true if the loader resolves definition to the same assembly as reference; otherwise, false.
Both reference and definition are resolved by the loader, including policy evaluation, and then definition is tested for equality to reference.
The order of comparison is important, because the method tests whether the loader will accept definition to satisfy a load request for reference. Such mappings are not necessarily two-way.
For example, you might compare "MyAssembly, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null" with "MyAssembly, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null".
If the handler for the AssemblyResolve event has a reference display name, it can pass the display name of an available assembly as the definition parameter, to see if the available assembly would satisfy the load request. If so, the handler can return the available assembly.
Supported in: 5, 4, 3
Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0
Supported in: Xbox 360, Windows Phone OS 7.0
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.