April 24, 2007 at 5:55 am
byte b = b.maxvalue;
byte x = ++b;
What is the value of x:
zero, less than 0, greater than 0 or undefined.
Please answer in detail
April 24, 2007 at 7:40 am
It gives an error, see below line.
Error 1 'byte' does not contain a definition for 'maxvalue'
April 24, 2007 at 11:42 pm
Even when i tried i found there is nothing like maxvalue defined for byte but apparantly there is.
See the below link:
http://msdn2.microsoft.com/en-us/library/system.byte.maxvalue(VS.71).aspx
April 29, 2007 at 11:16 pm
sounds like a homework problem to me.
why not code up this little program and see for yourself?
also, the property you are thinking of is byte.MaxValue, not maxvalue. C# keywords and types are case-sensitive.
---------------------------------------
elsasoft.org
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply