首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >F#校验算法范围?

F#校验算法范围?

提问于 2018-02-09 00:57:26
回答 2关注 0查看 183

F#允许通过打开来使用检查算法Checked模块,例如:

open Checked
let x = 1 + System.Int32.MaxValue // overflow

比如C#允许使用关键字checked:

int x = 1 + int.MaxValue;             // ok
int y = checked { 1 + int.MaxValue }; // overflow
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档