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
Solved

Pass Array to Class vb.net

Posted on 2014-04-17
2
552 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
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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