Measuring API Usability 
by Steven Clarke

Example 1: 

class FileIO
{
public FileIO(string path){...}
protected ~FileIO(){...}
public void Close() {...}
public void WriteLine(string text) {...}
public string ReadLine(){...}
public void DeleteFile(){...}
public FileIO CopyFile(string newPath) {...}
}

Example 2:

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");



1


