I am using the VS debuggers \'Immediate Window\' to call a static API on a class which is an ambiguous type defined in 2 different assemblies.
The call fails with the fo
As Maslow suggests, it is possible to use reflection to get what you want. It's not pretty, though. For example, if you want to see the value of the static property My.Properties.Settings.Default
, then assuming that MainWindow
is some other type in the assembly (e.g. blah.dll
) that contains the value you want to debug, this expression will get you the value:
System.Reflection.Assembly
.GetAssembly(typeof(MainWindow))
.GetType("My.Properties.Settings")
.GetProperty("Default")
.GetValue(null)
In this example, My.Properties.Settings
is a type that is defined in two different assemblies.
It's also possible to call methods etc. by using the appropriate tools from the System.Reflection
namespace.