Skip to content

Instantly share code, notes, and snippets.

@matarillo
Created April 4, 2014 10:54
Show Gist options
  • Save matarillo/9972224 to your computer and use it in GitHub Desktop.
Save matarillo/9972224 to your computer and use it in GitHub Desktop.
Imports System.Collections.ObjectModel
Module Module1
Sub Main()
Dim c As New Collection(Of Integer) From {1}
Foo(Of Integer)(c)
End Sub
Sub Foo(Of T)(ByVal o As Object)
Dim c = CType(o, Collection(Of T))
Console.WriteLine(c.FirstOrDefault())
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment