Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. something is wrong in vb.net 2005

something is wrong in vb.net 2005

Scheduled Pinned Locked Moved Visual Basic
helpcsharpbusinessquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mack Ait Aoudia
    wrote on last edited by
    #1

    Hello evreyone, Is anyone could tell me what's wrong with code snippet. I get an error in vb.net 2005: '1. Create 6 classes (I've removed all internal code since it is useless for the test) Public Class LockableDataObject End Class Public Class Business Inherits LockableDataObject End Class Public Class LockableDataManager(Of CustomType As LockableDataObject) End Class Public Class BusinessManager Inherits LockableDataManager(Of Business) End Class Module main Public Sub main() 'This line works Dim MyManager As LockableDataManager(Of Business) = New BusinessManager 'This line doesn't (Is this a bug? or is this wanted?) Dim MyManager2 As LockableDataManager(Of LockableDataObject) = New BusinessManager End Sub End Module Thanks a lot in advance. Jugurten.

    G 1 Reply Last reply
    0
    • M Mack Ait Aoudia

      Hello evreyone, Is anyone could tell me what's wrong with code snippet. I get an error in vb.net 2005: '1. Create 6 classes (I've removed all internal code since it is useless for the test) Public Class LockableDataObject End Class Public Class Business Inherits LockableDataObject End Class Public Class LockableDataManager(Of CustomType As LockableDataObject) End Class Public Class BusinessManager Inherits LockableDataManager(Of Business) End Class Module main Public Sub main() 'This line works Dim MyManager As LockableDataManager(Of Business) = New BusinessManager 'This line doesn't (Is this a bug? or is this wanted?) Dim MyManager2 As LockableDataManager(Of LockableDataObject) = New BusinessManager End Sub End Module Thanks a lot in advance. Jugurten.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      That is by design. The fact that B inherits A doesn't make C(Of B) inherit C(Of A).

      --- b { font-weight: normal; }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups