Dart
可以像C语言一样重载部分操作符。支持重载的操作符有:
< | + | ^ | [] |
> | / | & | []= |
<= | ~/ | << | ~ |
>= | * | >> | == |
– | % |
重载通过operator
关键字实现:
1 | class Point{ |
Dart
可以像C语言一样重载部分操作符。支持重载的操作符有:
< | + | ^ | [] |
> | / | & | []= |
<= | ~/ | << | ~ |
>= | * | >> | == |
– | % |
重载通过operator
关键字实现:
1 | class Point{ |
Update your browser to view this website correctly. Update my browser now
评论