Error "Object reference not set to an instance of an object"
-
Hi, I am just tired getting this error "Object reference not set to an instance of an object" in my project. I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread. Some code is as follows:
Private thrDownload As Thread
'''''' Some code is here''''''''''''' ' ' ' 'Now On This line I am getting an error : thrDownload.Start(0) ' Or On thrDownload.Pause(0) & thrDownload.Stop(0) the same error ! ' ' ' ' '''''' Some code is here'''''''''''''
If anyone wants then I can paste the whole code here but It's lots of lines of code ! :-> Any Suggestions ? :doh: Thanks, Dan -
Hi, I am just tired getting this error "Object reference not set to an instance of an object" in my project. I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread. Some code is as follows:
Private thrDownload As Thread
'''''' Some code is here''''''''''''' ' ' ' 'Now On This line I am getting an error : thrDownload.Start(0) ' Or On thrDownload.Pause(0) & thrDownload.Stop(0) the same error ! ' ' ' ' '''''' Some code is here'''''''''''''
If anyone wants then I can paste the whole code here but It's lots of lines of code ! :-> Any Suggestions ? :doh: Thanks, DanDan`M wrote:
I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread.
Yes, it can. You have to create the Thread object before you can use it.
--- "Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things." -- Douglas Adams
-
Dan`M wrote:
I know that to solve this error you can use New keyword but I don't think that "new" can be used with Thread.
Yes, it can. You have to create the Thread object before you can use it.
--- "Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things." -- Douglas Adams
sorry but can you show some example code please.. :->