27 lines
520 B
C#
27 lines
520 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
|
|
namespace RisorseEmbeddedRM
|
|
{
|
|
public class RisorseEmbedded
|
|
{
|
|
|
|
public static Stream GetResourceByName(string resourceName)
|
|
{
|
|
Assembly a = Assembly.GetExecutingAssembly();
|
|
|
|
try
|
|
{
|
|
return a.GetManifestResourceStream(resourceName);
|
|
}
|
|
catch
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
} |