On standalone code from VS 2010 Express-Rebuild

boolstatus = Part.EditRebuild3(toponly)

When I used this command from VS 2010 Express, it did not let me run it b/c of some error.  On VBA, it works just fine.  Is there a code of rebuild on VS 2010 equivalent to this VBA code shown above, or keyboard Ctrl Q?

Partial Class SolidWorksMacro

    Public Sub main()


           
            Dim swDoc As ModelDoc2 = Nothing
            Dim swPart As PartDoc = Nothing
            Dim swDrawing As DrawingDoc = Nothing
            Dim swAssembly As AssemblyDoc = Nothing
            Dim boolstatus As Boolean = false
            Dim longstatus As Integer = 0
            Dim longwarnings As Integer = 0
            swDoc = CType(swApp.ActiveDoc,ModelDoc2)
            Dim myModelView As ModelView = Nothing
            myModelView = CType(swDoc.ActiveView,ModelView)
            myModelView.FrameState = CType(swWindowState_e.swWindowMaximized,Integer)
        boolstatus = swDoc.EditRebuild3()
    End Sub

SolidworksApi macros