DEV Community

loading...
Cover image for Snippets in C#: Shorthand Instantiation

Snippets in C#: Shorthand Instantiation

Matt Kenefick
Senior Engineer -- Learn to code first. Use libraries second.
・1 min read

In order to eliminate some redundancy or increase readability, you can shrink the way you instantiate classes.

See the example below:

Discussion (0)