Preferred Language:
Listing 15.11 - Quote.cs
using System;
using System.Collections.Generic;
public class Quote
{
private List<string> _quotes = new List<string>();
public string GetQuote()
{
Random rnd = new Random();
return _quotes[rnd.Next(_quotes.Count)];
}
public Quote()
{
_quotes.Add("All paid jobs absorb and degrade the mind -- Aristotle");
_quotes.Add("No evil can happen to a good man, either in life or after death -- Plato");
_quotes.Add("The only good is knowledge and the only evil is ignorance -- Plato");
}
}
Need ASP.NET and Visual Studio 2008 Training?
- Learn ASP.NET 3.5 from Stephen Walther, author of ASP.NET 3.5 Unleashed.
We've provided ASP.NET training for NASA, Lockheed Martin, the National Science Foundation, Verizon,
Boeing, the US House of Representatives, Kaiser, Petco, Mary Kay, and Microsoft.
Why not your company?
-
Receive a four day, hands-on, intensive workshop.
-
We fly to you, anywhere in the world.
-
We can bring our own laptops.
To learn more, visit the
Superexpert Training website.