none
'Select' is not a member of 'System.Array' ??? RRS feed

  • Question

  • Hey, can anyone see why the following code

    Dim myStrings(My.Settings.test.Count - 1) As String
      My.Settings.test.CopyTo(myStrings, 0)
      DataGridView1.DataSource = myStrings.Select(Function(s) New With {.Value = s}).tolist
    

    would be giving me grief in an existing app but work fine when i put it a new project starting from scratch. I'm getting the following error:

    Error 6 'Select' is not a member of 'System.Array'. C:\Documents and Settings\Administrator\My Documents\My ECU\CSG3303\Citation Browser v2.6\Citation Browser\frmCitation.vb 43 36 Citation Browser

    many many thanks,

    Jimmy

     

    Monday, June 14, 2010 9:54 AM

Answers

  • Hi JimmyTeeRock,

    Go to the last item in the PROJECT menu which is <YourApplicationNameHere> Properties...

    and then select the references TAB.

    Make sure

    System.Linq

    is ticked in the Imported Namespaces in the bottom part of that TAB page.

    See.>>

     

     

    Regards,

    John

    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 4:21 PM
  • If you ask it like this, most probably the selected framework in the applications is older then 3.5

     


    Success
    Cor
    • Proposed as answer by Heslacher Monday, June 14, 2010 10:11 AM
    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 10:05 AM
  • Hi Jimmy -

    I much prefer answering questions like this in the forums because other people can also contribute and can benefit from the answers. But feel free to email me a link to any future questions.

    It looks like Cor and John already suggested the two things that I thought of as well.

    Let us know if one of these does not fix your problem.

    Good luck!


    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 4:37 PM
  • If you ask it like this, most probably the selected framework in the applications is older then 3.5

     


    Success
    Cor

    Hi again JimmyTeeRock,

    In support of the above post from Cor Ligthert MVP please see

    this thread on how to select the target Framework.>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/8fd86a29-d25b-40e4-909d-12da16c2d17f

    I remembered this recent question. :-)

     

    Regards,

    John

    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 5:03 PM

All replies

  • If you ask it like this, most probably the selected framework in the applications is older then 3.5

     


    Success
    Cor
    • Proposed as answer by Heslacher Monday, June 14, 2010 10:11 AM
    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 10:05 AM
  • Hi JimmyTeeRock,

    Go to the last item in the PROJECT menu which is <YourApplicationNameHere> Properties...

    and then select the references TAB.

    Make sure

    System.Linq

    is ticked in the Imported Namespaces in the bottom part of that TAB page.

    See.>>

     

     

    Regards,

    John

    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 4:21 PM
  • Hi Jimmy -

    I much prefer answering questions like this in the forums because other people can also contribute and can benefit from the answers. But feel free to email me a link to any future questions.

    It looks like Cor and John already suggested the two things that I thought of as well.

    Let us know if one of these does not fix your problem.

    Good luck!


    www.insteptech.com ; msmvps.com/blogs/deborahk
    We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 4:37 PM
  • If you ask it like this, most probably the selected framework in the applications is older then 3.5

     


    Success
    Cor

    Hi again JimmyTeeRock,

    In support of the above post from Cor Ligthert MVP please see

    this thread on how to select the target Framework.>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/8fd86a29-d25b-40e4-909d-12da16c2d17f

    I remembered this recent question. :-)

     

    Regards,

    John

    • Marked as answer by JimmyTeeRock Monday, June 14, 2010 11:36 PM
    Monday, June 14, 2010 5:03 PM
  • Yep, they are all correct.

    I almost had it myself but the Advanced compile button was hidden from view

    because my monitor is so small and ____

    ha!

    thanks to all of you.

     

    cheers,

    Jimmy

    Monday, June 14, 2010 11:37 PM