passing this as parameter in static method

送分小仙女□ 提交于 2019-12-02 03:20:42

This is a so called extention method to the Timeline object. It adds functionallity without modifying the class itself.

http://msdn.microsoft.com/en-us/library/bb383977.aspx

And in your case the animation parameter is the Timeline object (which is calling the function):

var timeLine = new Timeline();
timeLine.MethodTwo();

So the timeLine object will be passed as the animation parameter into the function. There's a nice article on wikipedia which explains it futher in detail:

http://en.wikipedia.org/wiki/Extension_method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!