Embedded resources and extended namespaces

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philipp Seidel

    Embedded resources and extended namespaces

    Hi there!

    I did not know, where this topic fits in, so I put it here.

    I have a minor problem with embedded resources, which puzzles me quite a
    lot. I'd be glad if anyone can help me on this:

    I've added a few files (images) to an assembly as embedded resources.
    Within the project folder these files are in a subfolder named "images".

    Now while trying to access them I expected to get them this way:
    RootNameSpace.N ameOfSubfolder. FileName
    i.e.:
    NameSpaceOfMyPr oject.Images.My Image.jpg

    This is how it is explained in here:
    Understanding Embedded Resources in Visual Studio .NET



    But what I experience under VB.NET, ist that it is not possible to organize
    embedded resources this way - meaning: the name space won't extend by the
    name of the subfolder.

    It's just this way:
    RootNameSpace.F ileName
    i.e.:
    NameSpaceOfMyPr oject.MyImage.j pg

    This behavoir fits more to what is discribed this article:
    How to Embed Resource Files in .NET Assemblies (cont'd)


    Ok, so far you'd might think, that one of the authors is wrong.
    But the answer is: No, they both seem to be right!

    I have downloaded and tried a C#-example from Eric Woodroff:
    A Resource Server Handler Class For Custom Controls

    ce

    As you can see there, the namespace extends, as expected first.

    This drives me nuts!!!
    *bangingheadtow all*
    ;-)

    Is there a difference how VB.NET and C# handle embedded Resources?
    Did I forget to configuere something?
    Did I misunderstand something?

    Please help me - otherwise I go crazy and won't come back!! ;-)

    Thanx!

    Philipp Seidel

    (P.S.: Actually this is kind of a crossposting. I posted this subject last
    week in microsoft.publi c.dotnet.framew ork.aspnet.buil dingcontrols and was
    probably kind of offtopic there, since no one answered. Sorry for that!)




  • Philipp Seidel

    #2
    @Moderator: Please delete this!

    I'm just too stupid!!!!!
    Sorry!!!

    Philipp Seidel
    (the one who goes hiding in the cellar now)


    Comment

    • Philipp Seidel

      #3
      @Moderator: Please delete this!

      I'm just too stupid!!!!!
      Sorry!!!

      Philipp Seidel
      (the one who goes hiding in the cellar now)


      Comment

      Working...