By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,236 Members | 1,839 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,236 IT Pros & Developers. It's quick & easy.

Noob Q: int?

P: n/a
hello all,

would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)

thanks in advance
sorry for questions like this...
Apr 4 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"dllhell" <dl*****@gmail.com> wrote:
would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)


int? means System.Nullable<int>
That should help you find it in MSDN.

--
Lucian
Apr 4 '06 #2

P: n/a
int is a number type, it's short for integer. It ranges from
-2,147,483,648 to 2,147,483,647.

You may wish to pick up a C# book that will explain it far better and in
more depth than you'll find in this newsgroup.

- Mark
On Tue, 04 Apr 2006 15:16:36 +0800, dllhell <dl*****@gmail.com> wrote:
hello all,

would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)

thanks in advance
sorry for questions like this...


Apr 4 '06 #3

P: n/a
dllhell wrote:
would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)

thanks in advance
sorry for questions like this...


No need to be sorry - C# 2.0 is still pretty new, and there's a lot to
learn in it.

int? is a shorthand for Nullable<int>. If that doesn't shed a lot of
light, see
http://www.pobox.com/~skeet/csharp/c.../nullable.html

Jon

Apr 4 '06 #4

P: n/a
thanks for given references :)
Apr 4 '06 #5

P: n/a
So "int" can be assigned null value in v2.0.

I wonder what "simple" type is left there... perheps pointer only?

"Lucian Wischik" <lu***@wischik.com>
???????:ok********************************@4ax.com ...
"dllhell" <dl*****@gmail.com> wrote:
would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)


int? means System.Nullable<int>
That should help you find it in MSDN.

--
Lucian

Apr 4 '06 #6

P: n/a
Hi,

In addition to the other posts here if you are working with 2.0 you better
use msdn2.microsoft.com , there if you write int? in the search box the
first result you get is what you are after.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"dllhell" <dl*****@gmail.com> wrote in message
news:e0**********@sunce.iskon.hr...
hello all,

would you like to explain what's mean "int?"
I have find it in funcion declarations but in msdn I can't find anything
useful by typing "int?" (msdn reurns everithing where "int" appears)

thanks in advance
sorry for questions like this...

Apr 4 '06 #7

P: n/a
Hi,
"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:Oe**************@TK2MSFTNGP15.phx.gbl...
So "int" can be assigned null value in v2.0.
No, you cannot assign null to an integer.
What you have is a new class Nullable<T> T:ValueType

so you can have Nullable<int> and have a new type that behave almost like a
"regular" int and can be nullable.

int? is just a shortcut that the compiler translate in the above
construction
I wonder what "simple" type is left there... perheps pointer only?

Exactly the same :)

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Apr 4 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.