Using C# Extension for enum, int, bool, etc
Using C# extension can extend your existing C# type, method's function.
write extension class to the same namespace. Then, you can simply call flg.Int().
There's case you access extension logic from different project, other DLL. Then, you just need to add Using to your class. See following example...
1) so first you add extension logic to shared Product [ClassLibrary1]
2) then when you want to access your extension logic, add reference to your project and add namespace to the class
I used case is adding extension to Enum class, for example, depend on enum's value return different name(string).
if you want to download above sample, click following button, then you can download sample application