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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

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

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -