Can you give me an infinite loop example on c# with minimum code? I came up with something but I thought there could be more easier way.
The typical examples are the for and while loops. For example
for(;;)
{}
and
while(true)
{}
However, basically any looping construct without a break or a terminating condition will loop infinitely. Different developers have different opinions on which style is best. Additionally, context may sway which method you choose.