Hello,
My application has got a generic list in the service.vb in the web service with following code:
<WebService(Namespace:="http://howto.com/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
Inherits System.Web.Services.WebService
Dim Customer As New System.Collections.Generic.SortedList(Of String, Customer)
Dim CusKey As String
----
The Customer class in the Customer.vb looks like:
Private mName As String
Public Sub New (ByVal mName As String)
Me.Name = mName
Public Property Name() As String
Get
Return mName
End Get
Set(ByVal value As String)
mName = value
End Set
End Property
---
I am adding in the service.vb data to the generic list with:
Customer.Add(CusKey, New Customer("tim"))
In the service.vb I can access the name property with Customer(cuskey).Name
But now I want to bring the code to another class called test with a function showname.
I want access that test class in the follwing way:
test.showname
That function should return the same value as Customer(cuskey).Name (in that example "tim"
My question is, how to access my generic list in another class. I prepeared everythin but it won't work.
Can you help me please

Accessing generics from all over the application
lamojo
Tim, I'm not sure I understand your scenario completely. If you can post the code to your test class and the expected output, I'll take a look. Also, if you're seeing an exception, please paste that in as well.
Cheers,
JJustice [MSFT]
robert r