StreamResourceInfo sri;
sri = App.GetResourceStream(new Uri("WebBrowserIsoStorage;component/Images/textmate.jpg", UriKind.Relative));
using (BinaryReader reader = new BinaryReader(sri.Stream))
{
using (BinaryWriter writer = new BinaryWriter(imageStream))
{
while (sri.Stream.Position < sri.Stream.Length)
{
writer.Write(reader.ReadByte());
}
}
}
路徑中的WebBrowserIsoStorage;
是什麼意思(第2行)?瞭解System.Uri
這來自某個MSDN論壇,不是嗎? ;) – BoltClock