C# Odd method call casting -


i encouter following code snippet, during try learn wpf.

((dependencyobject)targetobject).setvalue(dp, finalvalue); 

what code snippet mean? know instance method setvalue going call, (dependencyobject) not understand. casting?

targetobject cast dependencyobject, setvalue method of dependencyobject type can called.

my guess targetobject of type object, , doesn't have setvalue method available - until cast.

if removed (dependencyobject), should become clear - object type doesn't have setvalue method.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -