CJCoding With Joseph

Init-Only Property

Create a class Config with a string property Name that can be set only during object initialization, by using an init accessor instead of set. After construction the value is fixed. Do not write a Main method.

For new Config { Name = "prod" } the program prints:
prod

Expected Output:

prod
Topics:
Encapsulation
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.