Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27228

VS 2008 How can i make this work with my previous post?

$
0
0
Also since i refer back to my previous post..there's a new question at the bottom..i was gonna just post a new thread..but decided to try and keep it all under one Title

Code:

Public Shared Sub Main()

        Dim names As String() = New String(2) {}
        names(0) = "London"
        names(1) = "Paris"
        names(2) = "Zurich"
        Dim city As String()
        city = Array.Find(names, AddressOf StartsWithP)
        Console.WriteLine("City Match Found: {0}", city)
End Sub
Public Shared Function StartsWithP(item As String) As Boolean
        Return item.StartsWith("P", StringComparison.InvariantCultureIgnoreCase)
End Function


Viewing all articles
Browse latest Browse all 27228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>