I have a piece of code like this
Assembly myAssembly = Assembly.GetExecutingAssembly(); string[] names = myAssembly.GetManifestResourceNames(); foreach (string file in names) { if (file.EndsWith(".dtd")) { // attach to stream to the resource in the manifest dtdStream = myAssembly.GetManifestResourceStream(file); MessageBox.Show(dtdStream.ToString()); } }
I have all the dtd files in the My Resources folder. It has a built-in resource like assembly.Now when I debug the code, I get a window with the message System.IO.UnmanagedMemoryStream
But I want a Managed MemoryStream?What is wrong in my code?Thanks...
(EXE DLL), , , . , GetManifestResourceStream, ( UnmanagedMemoryStream).
GetManifestResourceStream
UnmanagedMemoryStream
, ? MemoryStream UnmanagedMemoryStream , () , .
MemoryStream
" " .
: http://msdn2.microsoft.com/en-us/library/system.reflection.emit.modulebuilder.definemanifestresource(VS.85).aspx
Source: https://habr.com/ru/post/1709231/More articles:Search VoIP Provider - apiRecycling the floating point equation - floating-pointCan I use Source Safe over the Internet? - version-controlAny free alternative to ASP.net management calendar? - c #Has anyone used the YAWS server as an HTTP proxy? - httpКак я могу создать функцию jQuery, которая сжимает строку, используя метод двоичного поиска? - javascriptMass refactoring C # - c #Deployed .net application on a new computer and getting "The system cannot execute the specified program" - .nethow to add key value to javascript object - javascriptGet a user counter for a Google Apps domain - google-appsAll Articles