开发者

Can I create an extension method for System namespace and add it to the GAC?

开发者 https://www.devze.com 2023-01-20 15:19 出处:网络
In principle, can I create a class library to store my Extension me开发者_如何学Cthods for System namespace for example, and add it to the GAC to be usable from any project in my development machine a

In principle, can I create a class library to store my Extension me开发者_如何学Cthods for System namespace for example, and add it to the GAC to be usable from any project in my development machine and able to deployment on the GAC of other machines by the setup project ?

If yes, Do you think it useful?

Thanks in advance.


Yes you can create an extension method and put it in a class defined in the System namespace and then deploy the assembly in the GAC. Other projects could reference the assembly from the GAC and use the extension method.

Do you think it useful?

Personally I hate the GAC and never use it for custom assemblies. I always prefer applications to be self contained but for people who use it, it could be nice.

0

精彩评论

暂无评论...
验证码 换一张
取 消