Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Cursed C#

This is a repo containing a collection of personal snippets of "cursed" C# code, i.e. code that is intentionally confusing, obscure, counter-intuitive, comically impractical, and/or otherwise bizarre.

The main purpose of this code is to demonstrate quirks of C# syntax and semantics.

Stuff

File Output Description
ListPattern.csx true Uses a list pattern to match an array of structs.
Var.cs Compiles Uses three different naming scopes with the identifier var.
Delegate.csx Throws NullReferenceException Confusingly named delegate invoked with a null instance of itself as an argument.
StackOverflow.csx Stack overflow Abuses a recursive property in script mode.
Attribute.cs Compiles Abuses an invalid attribute target so the compiler ignores the entire attribute.

About

Snippets of cursed C# code.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages