troubleshooting Question

C# syntax (class library returning a generic list)

Avatar of pttoy
pttoy asked on
.NET Programming
7 Comments1 Solution252 ViewsLast Modified:

This should be simple for C# developers.  I am new to the language and syntax.

Here is some basic VB.net code which I use all the time to access a class library call which returns a list(of structure)

How would I write this code in C#.

        Dim myEmp As New clsLibrary.Employees
        Dim myList As New List(Of clsLibrary.Employees.Employees_Structure)
        myList = myEmp.getStructEmployeeList("SEN", "Active")

        Dim query = From emp In myList Order By emp.LastName, emp.FirstName

        For Each item In query
            Response.Write(item.LastName & "<br/>")
        Next

Thanks!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros