Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#C# , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで) 36 bytes

C# , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

A shorter version, 35 bytes, can be achieved, but prints Process is terminated due to StackOverflowException which I believe violates the third point of not printing anything to stderr. Credit to MichaelB

class B{static int Main()=>Main();}

#C# , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

A shorter version, 35 bytes, can be achieved, but prints Process is terminated due to StackOverflowException which I believe violates the third point of not printing anything to stderr. Credit to MichaelB

class B{static int Main()=>Main();}

C# , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

A shorter version, 35 bytes, can be achieved, but prints Process is terminated due to StackOverflowException which I believe violates the third point of not printing anything to stderr. Credit to MichaelB

class B{static int Main()=>Main();}
added
Source Link
Namaskar
  • 984
  • 1
  • 9
  • 14

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks GeobitsGeobits and MichaelSMichaelS.

A shorter version, 35 bytes, can be achieved, but prints Process is terminated due to StackOverflowException which I believe violates the third point of not printing anything to stderr. Credit to MichaelB

class B{static int Main()=>Main();}

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

A shorter version, 35 bytes, can be achieved, but prints Process is terminated due to StackOverflowException which I believe violates the third point of not printing anything to stderr. Credit to MichaelB

class B{static int Main()=>Main();}
syntax highlighting
Source Link
Namaskar
  • 984
  • 1
  • 9
  • 14

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}
class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

#C#, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) 36 bytes

class B{static int Main(){for(;;);}}

For loop with no stopping condition.

The return of main should be an int, but since it'll never reach the end this should compile. (Tested in VS 2015 and 2013, also works in Ideone). Thanks Geobits and MichaelS.

changed void to int
Source Link
Namaskar
  • 984
  • 1
  • 9
  • 14
Loading
there was an extra byte to be saved thanks to geobits
Source Link
Namaskar
  • 984
  • 1
  • 9
  • 14
Loading
Source Link
Namaskar
  • 984
  • 1
  • 9
  • 14
Loading

AltStyle によって変換されたページ (->オリジナル) /