Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var selectedTextBox = (TextBox)sender,
- if (IsAdmin)
- {
- selectedTextBox.Enabled = true;
- selectedTextBox.Text = superSecretPassword;
- }
- else
- {
- selectedTextBox.Clear();
- }
- Cast<TextBox>(sender).
- WithIf(IsAdmin,
- With(selectedTextBox => selectedTextBox.Enabled = true).
- With(selectedTextBox => selectedTextBox.Text = superSecretPassword),
- With(selectedTextBox => selectedTextBox.Clear());
- interface foo {
- int bar();
- }
- class myClass1 implements foo {
- // No member variables.
- int bar() {
- // Implementation
- }
- // No other methods.
- }
- class myClass2 implements foo {
- // No member variables.
- int bar() {
- // Implementation
- }
- // No other methods.
- }
Add Comment
Please, Sign In to add comment