Piotr Ruda
Piotr Ruda

Reputation: 3

How to force an application to stop responding in C#

Hello how can i force my program to stop responding. I guess i should make a loop of something but i dont want to leak memory.

this is what i want to do

Could someone provide me an example?

Upvotes: 0

Views: 341

Answers (1)

JonasH
JonasH

Reputation: 36629

Run Thread.Sleep(60_000) on the UI thread. That will effectively hang your application for a minute.

Upvotes: 2

Related Questions