TypeForwardedTo in VB.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'm trying to get the TypeForwardedTo attribute working on visual basic, but
when I move my type to another type library, recompile both type libraries
(but not the client app, of course), the client application still complaints
that it cannot find the 'moved' type.

On the Internet there are lots of examples, all in c# but somebody somewhere
also complains about the fact that it seems to have no effect on vb...

Here is my attribute declaration:

<Assembly:
TypeForwardedTo(GetType(segonallibreriadeproves.ClasseDeLlibreriesDeProvesALeiter))>

And here's the simple type I moved:

Public Class ClasseDeLlibreriesDeProvesALeiter

Dim _missatge As String

Sub New(ByVal missatge As String)
_missatge = missatge
End Sub

Public Property missatge() As String
Get
Return _missatge
End Get

Set(ByVal value As String)
_missatge = value
End Set

End Property

Public Sub MostraMissatge()
MsgBox(missatge)
End Sub

End Class
 
On the Internet there are lots of examples, all in c# but somebody somewhere
also complains about the fact that it seems to have no effect on vb...

I believe this feature requires some support from the compiler, which
might not be there in VB. As I recall, this feature was added pretty
late in the 2.0 dev cycle.


Mattias
 
Ok thanks, but it seems dreadful to me that the whole MSDN stuff does mention
that this is really available on vb too.. also it appears in the book "self
paced training kit for exam 70-536" without mentioning this little point...

Thanks,
 
Hello,

the documentation (MSDN) states that this attribute is not supported with
VB.NET 2005.

Best regards,
Henning Krause
 
Oh, I'm so sorry for that. You know, None are more blind than those who
refuse to see.

Thanks a lot again,

Roger
--
Roger
..NET 2005 and DB developer


Henning Krause said:
Hello,

the documentation (MSDN) states that this attribute is not supported with
VB.NET 2005.

Best regards,
Henning Krause
 
Back
Top