Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pass Array to Class vb.net

Posted on 2014-04-17
2
Medium Priority
?
637 Views
Last Modified: 2014-04-17
How do I pass an array into a class property in VB.NET?

For example, in my class I have the following code:

    Public Property GCArray() As String
        Get
            Return Me.cGCArray()
        End Get
        Set(value As String)
            Me.cGCArray() = value
        End Set
    End Property

Open in new window


cGCArray() is created when i  split a list of strings.
I'd like to be able to access each string when using the class like this:

textVar = myClass.GCArray(x)

I'm missing something - cause my code isn't working.  Any ideas?

Thank you for your help!!!
0
Comment
Question by:slightlyoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40006937
Public Property GCArray() As String()

Open in new window


Add the parens at the end.
0
 
LVL 1

Author Comment

by:slightlyoff
ID: 40006946
That was fast!  Thank you for your help!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question