Just started playing with C# after many years of Delphi coding. One question I have is to do with Class inheritance.
In Delphi you could do things like this
but as I found in C# there seems to be no way of inheriting a thread due to the fact the class is sealed. Im guessing Im just being narrow minded and my past Delphi experience is making this harder than is needs to be.
Am I overlooking something simple here or can it just not be done?
I would like to create a class that is basically a thread but with a couple of extra variables and functions in it.
Thanks for any help!
In Delphi you could do things like this
Code:
TMyClass = Class(TThread)
....
Public
FVariable : string;
End;
MyClass : TMyClass;
MyClass := TMyClass.Create(True);
MyClass.FVariable := Test;
but as I found in C# there seems to be no way of inheriting a thread due to the fact the class is sealed. Im guessing Im just being narrow minded and my past Delphi experience is making this harder than is needs to be.
Am I overlooking something simple here or can it just not be done?
I would like to create a class that is basically a thread but with a couple of extra variables and functions in it.
Thanks for any help!