Created
May 21, 2020 03:16
-
-
Save arman-hpp/ca95d36b79436a3443189d640bc20783 to your computer and use it in GitHub Desktop.
Enum.IsDefined
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public KeyboardLayoutType LayoutType | |
{ | |
get | |
{ | |
return this.layoutType; | |
} | |
set | |
{ | |
if (!Enum.IsDefined(typeof (KeyboardLayoutType), (object) value)) | |
throw new ArgumentException("Invalid LayoutType. When setting the LayoutType property, it must be a valid member of the KeyboardLayoutType enumeration!"); | |
this.MainLayoutPanel = this.GetLayoutPanelByLayoutType(value); | |
this.layoutType = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment