Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Array Problem

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    449

    Resolved [RESOLVED] [2005] Array Problem

    Hello,
    I am getting "Overload resolution failed because no accessible 'Sort' accepts this number of arguments" with the code below

    Will be thankful for any feedback...

    Code:
    Dim temp As Integer() = {8, 4, 5, 3, 1, 6, 9, 7, 2, 1, 4}
            temp.Sort()

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] Array Problem

    You don't sort an array like that. Array.Sort is a Shared method and you use it like this:
    vb.net Code:
    1. Array.Sort(temp)
    If you try to use a method and it doesn't work the first thing you should do every time is go to the MSDN documentation for that method and read it. Quite often the problem will be obvious, as it would in this case.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2005
    Posts
    449

    Re: [2005] Array Problem

    You are right, JMC..
    Many thanks indeed...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width