C# String轉成FontStyle


                    //將String轉成FontStyle
                    FontStyle fsStyle = (FontStyle)Enum.Parse(typeof(FontStyle), sContentFontStyle);


sContentFontStyle為FontStyle的string值,多個時以","分隔 。如:
FontStyle fsStyle = (FontStyle)Enum.Parse(typeof(FontStyle), "Bold,Italic,Underline,Strikeout");


原文地址:https://www.cnblogs.com/scottckt/p/1153003.html