Measuring API Usability
By Steven Clarke, May 01, 2004
Source Code Accompanies This Article. Download It Now.
Steven examines some techniques that Microsoft uses to design and evaluate the usability of the APIs that ship with .NET.
May04: Measuring API Usability
IPAddress hostIPAddress = IPAddress.Parse("130.23.43.234");
IPAddress theAddress = new IPAddress(hostIPAddress);
CEmailServer theServer = new CEmailServer (theAddress);
if (theServer.Connect ())
{
CMailbox theMailbox = theServer.GetMailbox ("stevencl");
theMailbox.Open("stevencl", true);
CEmailMessage theMessage = theMailbox.NewMessage();
theMessage.Build("message", " subject", "to@you.com");
theMailbox.Send (theMsg, true);
theMailbox.Close();
}
else
Console.WriteLine ("Could not connect to the mail server");
Example 2: Using an API to create/send a new e-mail message.