2
Gablern
6y

I started programming with Threads (in C#) I though it can't be this difficult after i get it how to create a delegate right (2 hrs) and interact with my form without a crash (after another hr, but it didn't do this what it supposed to do) there popped up errors kind of randomly out of nothing and I have no idea how to avoid or catch them😩

Comments
  • 0
    You should use tasks. They abstract away the nitty gritty of thread management.
  • 0
    System.Threads.Tasks.Task<T> is all you need for multi threading in .Net
  • 0
    @oudalally spot on. Yes, when UI is involved it gets slightly more complicated.
  • 0
    Without my UI it would work just fine but I try to log everything, first in a richtextbox and second in a streamwriter, my actual try is to call a method to do this but it crashes horribly ( do this direkt didn't worked out well too)
Add Comment