Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何方法,给出如下声明
First().Second();
从内部知道First()是否/何时Second()执行?
First()
Second()
参考:http ://martinfowler.com/dslwip/MethodChaining.html
Second()在完成之前不会执行First(),因此这是不可能的。能做的就是First()破坏流畅度,从而无法Second()运行。