ASP.NET 2.0 Instant Results
Description
GetContactsByFirstLetterAsCollection(ByVal SqlDataReader
Shared method
DiaryId As Integer, Optional ByVal
that returns a
FirstLetterOfSurname As Char)
ContactCollection
object populated
with
Contact
objects
whose surname's first
letter matches the
FirstLetterOfSurname
argument. This argument
is optional; if left off, all
Contact
objects regard-
less of surname's first
letter are included in
the DataSet's rows.
Finally, the
Contact
class contains the following properties:
Property
Type
Description
ContactId
Long
Each contact is represented by a unique ID. The ID is auto-
generated by the Contact table in the database whenever a
new contact is inserted.
FirstName
String
Contact's first name.
LastName
String
Contact's surname.
Email
String
Contact's e-mail address.
Telephone
String
Contact's telephone number.
MobilePhone
String
Contact's mobile phone number.
AddressLine1
String
Contact's house name and street address.
City
String
Contact's city of residence.
State
String
Contact's state.
PostalCode
String
Contact's zip or postal code.
The ContactCollection Class
The
ContactCollection
class inherits from the
System.Collections.CollectionBase
class. The
ContactCollection
class's purpose is simply to store a collection of
Contact
objects. This class gets
extensive use in the next chapter, when you create a contacts organizer.
10
Chapter 1