default(MyStruct) vs new MyStruct() - what is the difference?
- 4/13/2022
- 2 minute read
There are multiple ways to create a new struct, either via var myStruct = default(MyStruct) or via var myStruct = new MyStruct(); . Are there any differences?
Topic
There are multiple ways to create a new struct, either via var myStruct = default(MyStruct) or via var myStruct = new MyStruct(); . Are there any differences?