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.
TParallel.&For和有区别TParallel.For吗?
TParallel.&For
TParallel.For
两者都可以在 Delphi 10 Seattle 中编译。那我应该坚持哪一个?
的方法定义TParallel.&For要求与符号转义保留字 ( for)。调用方法时不需要使用它,除非存在歧义。
for
例如 :
with TParallel do begin &For(...) // etc end;
但是,我无法想象你为什么会想要这样做。
如果它在您自己的某个类中,请注意,对转义方法的任何内部调用都需要与符号或显式类或实例 ( self) 标识符。
self
TParallel是一个密封的类,所以在这种情况下这一点没有实际意义。你永远不会在它或后代类中工作。
TParallel