Now, as a C# programmer, I know that generics are awesome. However, when dabbling in some VB.NET, I discovered that the following does not cause a compiler error:
Dim instance As List(Of Integer)
instance.Add(True)
Why is this? I know that you are not required to cast in VB.NET, but I'd have thought that this kills the main reason to use generics - type safety.
Edit: I do not have option strict on, as this wasn't a real programming exercise, just me having a look at VB.NET in theory. It is a theoretical question, as I was expecting it to cause a compiler error even with option strict off, just as a feature of generic types.