multithreading - How to create custom objects/list of custom objects in VB.NET? -


I need two separate lists, which are the integer, string, bitmap of each item - and that's every item integer , String string Although I do not know how to do this, or even to see - I have googled for custom objects and custom object lists. What I'm trying to do is to use Custom Object1 integer, string, bitmap custom Object2 is integer, string, string

I will add items to List1 (Object1's), and processing them, and adding 2 results to List2 (2 of the object), but me To see the list needs to be enabled from the other thread and say only to give me the item where the integer = (my thread id), is it possible? Any help, or even links to information that would be relevant to this request?

Do something like this:

  public class type 1 private _ThreadID Integer public property (threadid) meets as integer as return return _ThreadID termination set _ThreadID = value ending set end property private _MyString go string string as public property () as MyString _MyString termination bitmap public property MyBitmap Set _MyString = value ending set end asset Private _MyBitmap go get as bitmap back _MyBitmap end set _MyBitmap = Value End Set End Property End Class  Go 

.

  dim list 1 new list (like type 1) () ') ()' '# ... add some items to the list ...' # # List from a given thread ID Item: Dim SomeT hreadID integer = GetMyThreadID as () list1.Where (function (o) o.ThreadID = SomeThreadID)  

Of course, you want to use a more meaningful name . For multi-threading aspect, check to use the monitor class to lock your lists on all lists, while a thread is using it.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -