Is it a good idea to put all assembly: WebResource in the same cs file?

Posted by Guilherme J Santos on Programmers See other posts from Programmers or by Guilherme J Santos
Published on 2012-04-19T15:26:09Z Indexed on 2012/10/04 21:53 UTC
Read the original article Hit count: 385

Filed under:
|
|
|

I have a .NET library, with some WebControls.

These webControls have Embed Resources.
And we declare them like it, in all webcontrols for each cs file:

Something like this:

 [assembly: WebResource("IO.Css.MyCSS.css", "text/css")]
    namespace MyNamespace.MyClass
    {
         [ParseChildren(true)]
         [PersistChildren(false)]
         [Designer(typeof(MyNamespace.MyClassDesigner))]
         public class QuickTip : Control, INamingContainer
         {
        //My code...
          }
    }

Would it be a good idea to create a cs file and include all WebResource declarations there?

Example a cs file with just:

     [assembly: WebResource("IO.Css.MyCSS.css", "text/css")]
     [assembly: WebResource("IO.Image.MyImage.png", "image/png")]
//And many other WebResources of all WebControls of the Assembly

© Programmers or respective owner

Related posts about c#

Related posts about .NET