Can PowerShell arrays hold diferrent data types ?

Welcome Forums General PowerShell Q&A Can PowerShell arrays hold diferrent data types ?

Viewing 2 reply threads
  • Author
    Posts
    • #170311
      bin
      Participant
      Topics: 5
      Replies: 4
      Points: 29
      Rank: Member

      hello

      i know that you cannnot mix data type in the same array like this

      @("hello",1..10)

      but is it a way to do it?

      thank you

    • #170320
      Participant
      Topics: 9
      Replies: 427
      Points: 706
      Helping Hand
      Rank: Major Contributor

      of course you can

      @("hello",(1..10))
      

      Practical guide to PowerShell Arrays

    • #170428
      bin
      Participant
      Topics: 5
      Replies: 4
      Points: 29
      Rank: Member

      thank you

Viewing 2 reply threads
  • The topic ‘Can PowerShell arrays hold diferrent data types ?’ is closed to new replies.