G
Ganesh J. Acharya
|| Shree Ganesha ||
I am reading this book, MCAD/MCSD Tranining - Developing Windows Based
Applications with visual basic .net and visual c# .net-by MSPRESS
The book reades the following
"The code in this example will complile and execute without raising an
error. How ever, when you examine the value aShort, you find that it
contains -31072. Because the maximum value of aShort is smaller that
the value that you attempted to convert, the conversion could be
performed and a different value was returned."
The code example was
Dim anInteger As Integer = 100000
Din aShort As Short
aShort = CType(anInteger, Short)
Here the error is successfully raised saying that "Arithmatic
operation resulted in to a data overflow" the book seems to either a
old version or the software vb.net was later improved please let me
know the details
Ganesh J. Acharya
B.Sc
& Students of karROX Dombivali evening batch Sep 2003
I am reading this book, MCAD/MCSD Tranining - Developing Windows Based
Applications with visual basic .net and visual c# .net-by MSPRESS
The book reades the following
"The code in this example will complile and execute without raising an
error. How ever, when you examine the value aShort, you find that it
contains -31072. Because the maximum value of aShort is smaller that
the value that you attempted to convert, the conversion could be
performed and a different value was returned."
The code example was
Dim anInteger As Integer = 100000
Din aShort As Short
aShort = CType(anInteger, Short)
Here the error is successfully raised saying that "Arithmatic
operation resulted in to a data overflow" the book seems to either a
old version or the software vb.net was later improved please let me
know the details
Ganesh J. Acharya
B.Sc
& Students of karROX Dombivali evening batch Sep 2003