开发者

Method chaining on a new line in boo

开发者 https://www.devze.com 2023-02-26 03:21 出处:网络
Is it possible to make method chaining in a new line, like you can do in C#? var foo = bar 开发者_运维百科 .MethodOne()

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

精彩评论

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