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

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -