properties of a string object

Welcome Forums General PowerShell Q&A properties of a string object

Viewing 2 reply threads
  • Author
    Posts
    • #206970
      Participant
      Topics: 20
      Replies: 21
      Points: 22
      Rank: Member

      When creating a string variable

      $a=”aaa”

      if I run $a, powershell prints out the string value. But how it this output actually derived? When doing get-member, I don’t see any properties which point to the string value.

    • #206973
      Moderator
      Topics: 3
      Replies: 216
      Points: 1,176
      Helping Hand
      Rank: Community Hero

      @Garegin Asatryan, please go through the link below, in the description section you will find what you are looking for…

      https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/out-default?view=powershell-7

      Thank you.

    • #207009
      js
      Participant
      Topics: 29
      Replies: 810
      Points: 2,432
      Helping Hand
      Rank: Community Hero

      There is a character array:

      'hi' | gm chars
      
      
         TypeName: System.String
      
      Name  MemberType            Definition
      ----  ----------            ----------
      Chars ParameterizedProperty char Chars(int index) {get;}
      
      
Viewing 2 reply threads
  • You must be logged in to reply to this topic.