Array warning sorting when porting to .NET 3.5

I just converted a VB.NET application from .NET 1.1 to 3.5 and I get a warning message

Access to a common member, permanent member, enumeration element or nested type through an instance; qualification 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 in the second line.

What causes this?

+4
source share
1 answer

Array.Sort is a static / shared method and should be invoked accordingly:

 Array.Sort(arr) 
+5
source

All Articles