Workshop

Quiz

1:What is the one mutable property of a variable, and how is it changed throughout the execution of the program?
2:If you wanted a variable to store the values from 0 up to a value no greater than 10,000, what data type should you use?
3:Does the following code contain an implicit narrowing cast?
Dim a, b as Integer
b = 10
a = b / 2
4:Does the following statement evaluate to True or False?
(4 / 3) = 1
5:Does the following statement evaluate to True or False?
CType(4 / 3, Integer) = 1

Answers

A1: The value of a variable is the only mutable property; the name and data type are immutable. The value of a variable is changed via the assignment statement, which assigns a new value to a variable.
A2: You could use the Short data type, ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.