Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var settings = new Settings() {
- A = true,
- B = ... //Everything is fine since A is true
- }
- var settings = new Settings() {
- A = false,
- B = ... //Compile Error, Settings does not contain definition for "B"
- }
- //Somewhere that uses the settings variable...
- if(A) { useB(B); } else { useDefault(); }
Add Comment
Please, Sign In to add comment