We help IT Professionals succeed at work.
Get Started

Learning C# (How to create a class)

adamtrask
adamtrask asked
on
259 Views
Last Modified: 2012-06-22
Hello Experts,

I am taking the plunge into C# after acquiring a reasonable knowledge of VB.Net.

I am trying to declare a strongly typed string List in a new class:

Below is how I wrote it in VB.Net and I need some one to translate into C# the initial few lines:


Thanks
Public Class ListsDB
    Private _myCallsList As New List(Of String)
    Private _myTestList As New List(Of String)
    Private _myVisitsList As New List(Of String)
    Public Property MyCallsList() As List(Of String)
        Get
            Return _myCallsList
        End Get
        Set(ByVal value As List(Of String))
            _myCallsList = value
        End Set
    End Property
    Public Property MyTestList() As List(Of String)
        Get
            Return _myTestList
        End Get
        Set(ByVal value As List(Of String))
            _myTestList = value
        End Set
    End Property
    Public Property myVisitsList() As List(Of String)
        Get
            Return _myVisitsList
        End Get
        Set(ByVal value As List(Of String))
            _myVisitsList = value
        End Set
    End Property

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 2 Answers and 4 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE