using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public static class Utils
{
public static List GetResourceAsBytes(string ResourcePath)
{
List result = new List();
Uri uri = new Uri(ResourcePath, UriKind.Relative);
System.Windows.Resources.StreamResourceInfo sri = System.Windows.Application.GetResourceStream(uri);
System.IO.Stream componentStream = sri.Stream;
Byte[] bytes = new Byte[componentStream.Length];
int size = componentStream.Read(bytes, 0, (int)componentStream.Length);
result.AddRange(bytes);
return result;
}
}