FromResource() public static method

Loads a bitmap from the resource in the specified or caller's assembly
public static FromResource ( string resourceName, Assembly assembly = null ) : Bitmap
resourceName string Name of the resource in the caller's assembly to load
assembly System.Reflection.Assembly Assembly to load the resource from, or null to use the caller's assembly
return Bitmap
Example #1
0
        Image LoadImage(NamespaceInfo ns)
        {
            var isIcon = IsIcon(ns.Namespace);

            if (isIcon)
            {
                return(Icon.FromResource(ns.Namespace, ns.Assembly));
            }
            return(Bitmap.FromResource(ns.Namespace, ns.Assembly));
        }