You'll have to use interop. Here is a link to everything you'll need.

First, you'll have to call CreateFile to get a handle to the drive. Next, you'll have to call DeviceIOControl to eject the drive. And finally, you'll have to call CloseHandle to close the drive handle.

Assuming that your eject class is named DVD and that your DVD is the E: drive, you would initiate the ejection process as follows:

Code:
 DVD.Eject(@"\\.\E:");
Also, you'll need the following constants:

Code:
const uint GENERICREAD = 0x80000000;
const uint OPENEXISTING = 3;
const uint IOCTL_STORAGE_EJECT_MEDIA = 2967560;
const int INVALID_HANDLE = -1;
This is also needed:

Code:
using System.Runtime.InteropServices;