Thread: Avisynth+
View Single Post
Old 11th February 2017, 09:31   #3011  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
Quote:
Originally Posted by MysteryX View Post
In C# I could easily convert a string to its enumeration value but that won't work in C++.
http://stackoverflow.com/questions/1...o-an-enum-in-c
Quote:
Note that the performance of Enum.Parse() is awful, because it is implemented via reflection. (The same is true of Enum.ToString, which goes the other way.)
If you need to convert strings to Enums in performance-sensitive code, your best bet is to create a Dictionary<String,YourEnum> at startup and use that to do your conversions.
not that much different here, uh?

I also like dynamic features a lot cuz they are handy to use, but I would just go with a completely dynamic programming language like Python if I'm gonna use dynamic features throughout my program

Last edited by feisty2; 11th February 2017 at 09:37.
feisty2 is offline