LINQ in Action roller

November 2005 - Posts

  • Simple type Extension VB.Net

    Hi, I just wanted to try out a very simple type extension in VB.Net: Module Module1 Sub Main() Dim x As String = "50" Console.WriteLine(x.ToInt32()) End Sub End Module _ Class MyExtensions _ Function ToInt32( ByVal [Me] As System.String) As Integer Return Int32.Parse([Me]) End Function End Class I get the compiler error 'ToInt32' is not a member of 'String'. The same code (adapted of course) works in C#. The VB.NET 9.0 compiler seems to be installed correctly as I can get the type extension for IEnumerable Read More...

Featured Item

This Blog

Sponsoring

Syndication