简体   繁体   中英

Understanding resx file in vb.net project

When i compare my vb.net project with my previous version i can see some changes in resx file.But i am not able to understand it.I have not added any new resource actually. but still i can see some changes. I saw this article where i got some basics about it.That is data and value tag incase of any new resource is added.But in my project i can see some changes like below.

new

 <data name="PicForward.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>
 Qk1SDAAAAAAAADYAAAAoAAAAIQAAAB8AAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAxOz4xOz4
        xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4
        xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4EcTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs
        +MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs
        +MTs+MTs+MTs+MTs+BHE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE            
    </value>
      </data>

old

    <data name="PicForward.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>
Qk1SDAAAAAAAADYAAAAoAAAAIQAAAB8AAAABABgAAAAAAAAAAADEDgAAxA4AAAAAAAAAAAAAxOz4xOz4
        xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4
        xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4xOz4EcTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs
        +MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs+MTs
        +MTs+MTs+MTs+MTs+ADE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE7PjE            
    </value>
      </data>

In above case in between the value tag there was so many characters like this.I have skipped it as it is lengthy. But i cant understand why this value tag changed(only small changes i have observed).I am creating project using visual studio.I am not directly editing anything in resx file. So please clear my doubts related to it.

The reason for this change is because you are working with an image being saved (to the .resx file) as a base 64 string.

see the mimetype -

mimetype="application/x-microsoft.net.object.bytearray.base64"

<data name="PicForward.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

So when the image gets saved, or changes - the Base64 needs to be re-written to the .resx file, hence, it changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM