Click here to Skip to main content
15,902,112 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is an Array of Dictionaries the solution here? Pin
PIEBALDconsult30-Jun-11 14:15
mvePIEBALDconsult30-Jun-11 14:15 
GeneralRe: Is an Array of Dictionaries the solution here? Pin
TheBlindWatchmaker4-Jul-11 20:19
TheBlindWatchmaker4-Jul-11 20:19 
AnswerRe: Is an Array of Dictionaries the solution here? Pin
BobJanova1-Jul-11 3:05
BobJanova1-Jul-11 3:05 
GeneralRe: Is an Array of Dictionaries the solution here? Pin
TheBlindWatchmaker4-Jul-11 20:22
TheBlindWatchmaker4-Jul-11 20:22 
GeneralRe: Is an Array of Dictionaries the solution here? Pin
TheBlindWatchmaker4-Jul-11 21:04
TheBlindWatchmaker4-Jul-11 21:04 
GeneralRe: Is an Array of Dictionaries the solution here? Pin
BobJanova5-Jul-11 7:17
BobJanova5-Jul-11 7:17 
GeneralRe: Is an Array of Dictionaries the solution here? Pin
TheBlindWatchmaker5-Jul-11 7:24
TheBlindWatchmaker5-Jul-11 7:24 
QuestionQuestion about embedding dll's into an executable Pin
turbosupramk330-Jun-11 10:13
turbosupramk330-Jun-11 10:13 
I am using a dll called "EPPlus.dll" in my code and I want to wrap it into the executable.

http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx[^]

Using the post above, it appears to be possible but my code below is failing. I'm not 100% on how the string resourceName is supposed to play into this, can anyone offer advice on how to get this code to work with EPPlus.dll? Thanks for reading.



using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Reflection;

namespace QCVerification
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainVerification());
            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
            {
                String resourceName = "AssemblyLoadingAndReflection." + new AssemblyName(args.Name).Name + ".dll";
                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
                {
                    Byte[] assemblyData = new Byte[stream.Length];
                    stream.Read(assemblyData, 0, assemblyData.Length);
                    return Assembly.Load(assemblyData);
                }
            };
        }
    }
}

AnswerRe: Question about embedding dll's into an executable Pin
Not Active30-Jun-11 11:47
mentorNot Active30-Jun-11 11:47 
GeneralRe: Question about embedding dll's into an executable Pin
turbosupramk330-Jun-11 14:21
turbosupramk330-Jun-11 14:21 
GeneralRe: Question about embedding dll's into an executable Pin
Not Active30-Jun-11 15:00
mentorNot Active30-Jun-11 15:00 
GeneralRe: Question about embedding dll's into an executable Pin
turbosupramk330-Jun-11 15:24
turbosupramk330-Jun-11 15:24 
GeneralRe: Question about embedding dll's into an executable Pin
Not Active30-Jun-11 16:00
mentorNot Active30-Jun-11 16:00 
Questionscreen Boundary Pin
om_metab30-Jun-11 7:58
om_metab30-Jun-11 7:58 
AnswerRe: screen Boundary Pin
gavindon30-Jun-11 8:04
gavindon30-Jun-11 8:04 
AnswerRe: screen Boundary Pin
OriginalGriff30-Jun-11 9:24
mveOriginalGriff30-Jun-11 9:24 
AnswerRe: screen Boundary Pin
turbosupramk330-Jun-11 10:25
turbosupramk330-Jun-11 10:25 
AnswerRe: screen Boundary Pin
Richard MacCutchan30-Jun-11 22:41
mveRichard MacCutchan30-Jun-11 22:41 
GeneralAuto Login Via a Link Pin
dbongs29-Jun-11 23:33
dbongs29-Jun-11 23:33 
GeneralRe: Auto Login Via a Link Pin
Not Active30-Jun-11 2:01
mentorNot Active30-Jun-11 2:01 
GeneralRe: Auto Login Via a Link Pin
dbongs30-Jun-11 3:56
dbongs30-Jun-11 3:56 
GeneralRe: Auto Login Via a Link Pin
Łukasz Nowakowski30-Jun-11 4:15
Łukasz Nowakowski30-Jun-11 4:15 
GeneralRe: Auto Login Via a Link Pin
Not Active30-Jun-11 4:32
mentorNot Active30-Jun-11 4:32 
AnswerRe: Auto Login Via a Link Pin
Eddy Vluggen30-Jun-11 9:27
professionalEddy Vluggen30-Jun-11 9:27 
GeneralRe: Auto Login Via a Link Pin
dbongs7-Jul-11 20:46
dbongs7-Jul-11 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.