0
A
回答
0
您可以使用以下msdn ref
System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(fileName)
這會給你一個流,你就可以使用code cite轉換爲一個字節數組,這是相當多的原始數據。
private Function GetStreamAsByteArray(ByVal stream As System.IO.Stream) As Byte()
Dim streamLength As Integer = Convert.ToInt32(stream.Length)
Dim fileData As Byte() = New Byte(streamLength) {}
' Read the file into a byte array
stream.Read(fileData, 0, streamLength)
stream.Close()
Return fileData
End Function
相關問題
- 1. 引用來自嵌入式資源的嵌入式資源
- 2. 來自庫的ASP.NET嵌入式資源
- 3. 引用來自c#中其他資源的嵌入式資源
- 4. 從嵌入式資源加載圖像
- 5. 嵌入式資源
- 6. C#,WPF,嵌入式資源/嵌入式資源
- 7. Xamarin來自資源的本地圖像
- 8. 作爲嵌入式資源加載的css背景圖像
- 9. Silverlight 3:合併資源字典 - 來自非嵌入式文件
- 10. ReadXml嵌入式資源
- 11. Silverlight MEF嵌入式資源
- 12. 嵌入式dll資源
- 13. 使用嵌入式資源
- 14. 嵌入式二進制資源 - 如何枚舉嵌入的圖像文件?
- 15. 從嵌入式資源中創建圖像
- 16. 將嵌入式資源圖像添加到MigraDoc文檔
- 17. 嵌入blob來自數據庫的圖像由phpMailer
- 18. 在資源文件中嵌入數據
- 19. C++自旋圖像資源
- 20. 嵌入式資源的奇怪行爲
- 21. 嵌入式資源文件的路徑
- 22. C++中的嵌入式資源
- 23. 目標C中的嵌入式資源?
- 24. 流星渲染來自嵌入式嵌套集合的數據
- 25. 來自資源的圖像的縮略圖
- 26. 如何獲取嵌入式資源的資源Uri?
- 27. C#:保存來自Outlook MailItem的嵌入式圖像
- 28. 如何引用來自CSS的嵌入式圖像?
- 29. 嵌入式ttf作爲嵌入式資源:無法引用它
- 30. XmlTextReader和嵌入式資源DTD