Site Downtime
Site will be down for a couple of days as I upgrade the blogging software and what not. Stay patient. :-)
How to Cast an ArrayList to an Array
So you have an ArrayList of strings and you want to return it as a string[] array. It's really easy:
return (string[])arrayList.ToArray(typeof(string));
Commercial Template: Six-Oh-Six

Here it is! My first commercial template! :-) It costs $50.00. Until I can get PayPal working with my template, e-mail me if you want the template. :-)
using Female = Earth. LivingBeings. HomoSapiens. Female;
If you didn't know the using statement given in the title is valid, then congratulations! Now you do. ;-)
Why would you use this instead of the more general using Earth.LivingBeings.HomoSapiens.Female? Well:
To Avoid Conflicting Class Names
Suppose you Autopsy.cs uses both Earth.LivingBeings.Humans.Female as well as the Earth.LivingBeings.Monkeys.Female classes. One way to resolve the naming conflict is to laborously type out the fully-qualified class name each time you use it. The other way is to:
using HumanFemale = Earth.LivingBeings.Humans.Female;
using MonkeyFemale = Earth.LivingBeings.Monkeys.Female;
How to Send Authenticated SMTP E-mail
protected void Page_Load(object sender, EventArgs e)
{
try
{
MailMessage message = new MailMessage(
"from@example.com",
"to@example.com",
"Some Important Message",
"This is a test message and it's not that important.");
SmtpClient client = new SmtpClient("your.smtp.server.com");
System.Net.NetworkCredential credentials = new
System.Net.NetworkCredential(
"username",
"password");
client.UseDefaultCredentials = true;
client.Credentials = credentials;
client.Send(message);
}
catch (Exception ex)
{
Response.Write("Whoops! Couldn't send the e-mail: " +
ex.ToString());
}
}
iTunes 7 Screenshots

I updated to iTunes 7 this morning to find that the user interface got even better than before. Take a look:






