I'm looking for some objects that in Delphi was very usefull for me.
- TStringList : In Delphi, a listbox is a graphical component with a TStringList, y managed code i can use TStringList like no graphical object but can use with strings .add, .delete, .insert .loadfromfile() ... is very usefull. ArrayList is the equivalent of TList, i'm looking for operate with strings.
- TThread: In C# i'm launch threads with Thread aganist a function, in Delphi i can define a TThread Object that is like a class with its own internal functions, and the thread runs like a little program in the app.
Regards.

Delphi objects equivalents
jgiacobbe
Regards.
Oh2BaLuddite!
The closest equivalent to TStringList would be StringCollection, List<string> or Collection<string> depending on what you wanted to do with the list. Ultimately they are all about the same.
In .NET you can create a class, initialize the class with whatever you need and then run one of the class'es methods on a secondary thread where it'll have access to its own state. For truly compartmentalized classes this could be done through a method exposed on the class itself.
class MyTestClass
{
public void DoWork ( )
{
}
}
//Later
MyTestClass cls = new MyTestClass();
//Interact with class properties and methods...
Thread t = new Thread(new ThreadStart(cls.DoWork));
t.Start();
Creating a separate class to do the work of the thread is generally a good idea since data needs to be passed. Ideally you should wrap this is a helper method that clients can call.
Michael Taylor - 9/3/06