Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Protected Overrides Sub OnLoad(e As EventArgs)
- MyBase.OnLoad(e)
- Dim entites = New List(Of Entite) From {New Entite With {.Nom = "william "}, New Employe With {.Nom = "John doe"}}
- DataGridView1.DataSource = entites.Select(Function(x) New With {.nom = x.Nom, .type = If(TypeOf (x) Is Employe, "Employe", "Entite")}).ToList
- End Sub
- End Class
- Public Class Entite
- Public Property Nom As String
- End Class
- Public Class Employe
- Inherits Entite
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement