'int' 和有什么不一样?和 C# 中的“int"? [英] What's the difference between 'int?' and 'int' in C#?

查看:20
本文介绍了'int' 和有什么不一样?和 C# 中的“int"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我 90% 确定我之前在 stackoverflow 上看到过这个答案,实际上我从未见过int?"在这里看到它之前的语法,但无论我如何搜索都找不到以前的帖子,这让我发疯.

I am 90% sure I saw this answer on stackoverflow before, in fact I had never seen the "int?" syntax before seeing it here, but no matter how I search I can't find the previous post, and it's driving me crazy.

可能是我不小心吃到了有趣的蘑菇,但如果我不是,请有人指出以前的帖子,如果他们能找到或重新解释一下吗?我的 stackoverflow search-fu 显然太低了....

It's possible that I've been eating the funny mushrooms by accident, but if I'm not, can someone please point out the previous post if they can find it or re-explain it? My stackoverflow search-fu is apparently too low....

推荐答案

int?是 Nullable 的简写.

int? is shorthand for Nullable<int>.

可能就是您要找的帖子.

This may be the post you were looking for.

这篇关于'int' 和有什么不一样?和 C# 中的“int"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆