Using VB 6.0 Interface in vb.net causes a problem
From: Yatin Bhuta (ybuhta_at_comcast.net)
Date: 04/06/04
- Next message: HANG LAM: "Closing events ?"
- Previous message: Q=ED=F4=FE=ED=E7=F2?=: "Re: SQL Server Connection Error"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 06 Apr 2004 03:34:47 GMT
Hi,
I have an interface in vb 6.0. It has a property set member, which takes a
parameter by reference. When I try to implement this interface in my vb.net
project it gives me an error saying that "cannot implement property set
because there is no matching property on interface". I think .NET does not
allow parameter to be passed ByRef in property statements.
here is my property set statement in vb 6.0 interface called IName
Property Set Name(ByRef objName as object)
End Property
VB.NET code looks like this
Public WriteOnly Property Name() as System.IntPtr implements IName.Name
Set (ByVal value as System.IntPtr)
end set
End Property
There is an underline below IName.Name. When I put my mouse over it then it
says "Cannot implement IName.Name because there is no matching property on
Interface IName". I tried changing the System.IntPtr to System.Object but it
gives the same result. I cannot change vb 6.0 interface to accept parameter
ByVal instead of ByRef because then, I have to change all other existing
components that already are implementing this interface.
Your help is appreciated.
Thanks
- Next message: HANG LAM: "Closing events ?"
- Previous message: Q=ED=F4=FE=ED=E7=F2?=: "Re: SQL Server Connection Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|