CJCoding With Joseph

Property With a Backing Field

Create a class User with a private string name backing field and a public Name property. The get returns the field; write the set so it stores value into the field. Do not write a Main method.

After setting Name to "Alice" the program prints:
Alice

Expected Output:

Alice
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.