Passing an array through a property...
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Passing an array through a property...Expand / Collapse
Author
Message
Posted 05/06/2008 10:40:15 AM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 06/27/2008 5:57:22 PM
Posts: 436, Visits: 942
How would I pass an array of integers through a property? Like this?

Public Property TransferIDs() As Int32
Get
Return mTransferIDs()
End Get
End Property
Post #16180
Posted 05/06/2008 1:36:12 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:47:41 AM
Posts: 4,104, Visits: 4,175
How would I pass an array of integers through a property? Like this?

What do you mean by "pass" in this case?  Are you just trying to set the property?

Post #16194
Posted 05/06/2008 1:44:55 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 06/27/2008 5:57:22 PM
Posts: 436, Visits: 942
I'm trying to pass an array from one form to another...
Post #16198
Posted 05/06/2008 1:53:16 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:47:41 AM
Posts: 4,104, Visits: 4,175
Well, all you have to do is pass an array via a parm...set it via a method...or provide a Set on the property:

Via a Method

Private Sub SetMyArray(ByVal items() As Integer)
   '-- Do whatever you want with the passed over array.  Set a property, use the array, etc.
End Sub

Via a Property

Private _MyItems As Integer()
Public Property MyItems() As Integer()
Get
    Return _MyItems
End Get
Set(ByVal value As Integer())
    _MyItems = value
End Set
End Property
Post #16200
Posted 05/06/2008 1:54:26 PM


StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 06/27/2008 5:57:22 PM
Posts: 436, Visits: 942
Thanks! I was making it harder than it was.
Post #16201
Posted 05/06/2008 9:09:13 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 8:47:41 AM
Posts: 4,104, Visits: 4,175
No problem...I do it all the time!
Post #16224
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 10:00am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.062. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.