471,059 Members | 1,359 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,059 software developers and data experts.

Using VB 6.0 Interface in vb.net causes a problem


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.


Nov 20 '05 #1
0 697

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Kevin Ollivier | last post: by
17 posts views Thread by gokul | last post: by
4 posts views Thread by Doug | last post: by
3 posts views Thread by Michael Hoehne | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.