I’ve just converted my VB.NET application from .NET 1.1 to 3.5, and I’m getting the warning message
Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated.
in
Private Function reOrderArray(ByVal arr() As String) As String
arr.Sort(arr) 'Sort array alphabetically
'More code...
return arr
End Function
for the words arr.Sort on the second line.
What is causing this?
Array.Sortis a static/shared method, and should be invoked appropriately: