Overloading operator

I need to overload operator assign (=) for a new class xDate that has super-class Date.

I want to be able to do this:
Dim xD as New xDate
Dim x As New Date
xD=X

Is this possible?

Sub Operator_Convert (d As Date)
  //
  // Go about converting from d keeping in mind
  // that it's up to you to call the Constructor explicitly
  // if needed
  //
End Sub

In your example, you do not need to create a “new” xDate. In fact, doing so is a waste since the object is created, then immediately discarded.

dim X as new Date
dim xD as xDate = X

Thanks Kem.