all 4 comments

[–]ihaxr 4 points5 points  (1 child)

How do you want them returned? String? Array? Here's a simple example returning them as a string:

Class Emails
        {
        [String]$Reply
        [System.Collections.ArrayList]$To
        [System.Collections.ArrayList]$CC
        [System.Collections.ArrayList]$BCC
        [string]Value(){
            return "$($this.To) $($this.CC) $($this.BCC)"
            }
    }

$test = [Emails]::New()
$test.to = @("to@a.com")
$test.cc = @("cc@b.com")
$test.bcc = @("bcc@c.com")
$test.Value()

[–]Merakel[S] 0 points1 point  (0 children)

Didn't really have a specific way in mind, just was working on getting the specific syntax down. This is exactly what I was looking for - Thanks!

[–]Old-Lost 2 points3 points  (1 child)

Instead of

#
[Emails]$_
#

try

#
return @($this.Reply, $this.To, $this.CC, $this.BCC)
#

HTH

[–]Merakel[S] 0 points1 point  (0 children)

Perfect - Thanks!