开发者

Method chaining on a new line in boo

Is it possible to make method chaining in a new line, like you can do in C#?

var foo = bar
 开发者_运维百科 .MethodOne()
  .MethodTwo()


whitespace is not significant inside () so the following is legal boo code:

a = (bar
     .Foo()
     .Bar())


You should use '\' symbol. See sample:

a = 123 \
       .ToString() \
       .Length
print a
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜