March 2008
Intermediate to advanced
766 pages
21h 15m
English
Considering the fact that the oldest person in the world lived to be 122, what's the best numeric data type to store a person's age? There are bonus points to collect if you come up with an even better alternative to store someone's age.
What does the following code do?
VB.NET
DeleteButton.Visible = ShoppingCart.Items.Count > 0
C#
DeleteButton.Visible = ShoppingCart.Items.Count > 0;
Given the following class Person, what would the code look like for a new class PersonWithPhoneNumber? Make use of inheritance to create this new class.
VB.NET
Public Class Person
Private _name As String
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
End Class
C#
public class Person
{
public string Name { get; set; }
}