Error code E0451
A struct constructor with private fields was invoked.
Erroneous code example:
ⓘ
To fix this error, please ensure that all the fields of the struct are public, or implement a function for easy instantiation. Examples:
Or:
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
A struct constructor with private fields was invoked.
Erroneous code example:
ⓘ
To fix this error, please ensure that all the fields of the struct are public, or implement a function for easy instantiation. Examples:
Or: