Rhino VB.NET Plugin migration from V5 to V7 - BinaryArchive

Dim geometry as GeometryBase = archive.ReadGeometry()
If geometry is Nothing Then Return False
Dim surface as Surface = TryCast(geometry, Surface)
if surface is Nothing Then Return False
SetFootCurvesTrimSurface(side, eTrimSurface.topExt, Interop.ToOnSurface(surface))

geometry = archive.ReadGeometry()
If geometry is Nothing Then Return False
surface = TryCast(geometry, Surface)
if surface is Nothing Then Return False
SetFootCurvesTrimSurface(side, eTrimSurface.topInt, Interop.ToOnSurface(surface))

I would highly recommend getting away from any RhinoDotNet code at all. RhinoDocNet has been deprecated for nearly 10 years and it should be removed from Rhino at some point in a future release.