NETCF - Array.Sort Method (Array, IComparer) - error

  • Thread starter Thread starter aprivate
  • Start date Start date
A

aprivate

Hi
I tried all the examples in the visual studio IDE but
the array.sort (array,icomparer) examples fails to
work in VB.NET for Smart Devices..

its get an error before it is compiled...

Is there a workaround?

Allan
 
aprivate said:
Hi
I tried all the examples in the visual studio IDE but
the array.sort (array,icomparer) examples fails to
work in VB.NET for Smart Devices..

its get an error before it is compiled...

Is there a workaround?

In the documentation for Array.Sort, only the following overloads are
listed as being supported by the .NET Compact Framework:

Overloads Public Shared Sub Sort(Array)
Overloads Public Shared Sub Sort(Array, Integer, Integer, IComparer)
Overloads Public Shared Sub Sort(Array, Array, Integer, Integer,
IComparer)

so to get your desired result you need to use the second of these and
explicitly supply the range to sort as being the entire array.
 
Hi
Ok - sorry - this is a better description

1) I just found a new example from the web

http://www.codepedia.com/1/VBNET_ArraySort

2) When I enabled this in the VB Smart Application program
it complains with the following message

"overload resolution failed because no accessible 'sort' accepts this
number of arguments'

All the declarations had no error.

3) When I pasted the same code into Vb.net for win32 project , it works.

Regds
Allan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top