Click here to Skip to main content
15,916,949 members
Home / Discussions / C#
   

C#

 
QuestionIs file mapping supported in microsoft .net framework Pin
Danzy831-Jul-11 5:26
Danzy831-Jul-11 5:26 
AnswerRe: Is file mapping supported in microsoft .net framework Pin
Ennis Ray Lynch, Jr.1-Jul-11 6:06
Ennis Ray Lynch, Jr.1-Jul-11 6:06 
QuestionHow do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
bbranded1-Jul-11 5:16
bbranded1-Jul-11 5:16 
AnswerRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
Dave Kreskowiak1-Jul-11 7:14
mveDave Kreskowiak1-Jul-11 7:14 
GeneralRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
bbranded1-Jul-11 9:10
bbranded1-Jul-11 9:10 
GeneralRe: How do I monitor bytes per second written or read from a directory (and sub-directories)? Pin
Dave Kreskowiak1-Jul-11 11:07
mveDave Kreskowiak1-Jul-11 11:07 
Questionquestion Pin
ivan_go1-Jul-11 1:57
ivan_go1-Jul-11 1:57 
AnswerRe: question PinPopular
Pete O'Hanlon1-Jul-11 2:19
mvePete O'Hanlon1-Jul-11 2:19 
QuestionConvert SQL Data Type To C# Pin
Kevin Marois30-Jun-11 15:49
professionalKevin Marois30-Jun-11 15:49 
AnswerRe: Convert SQL Data Type To C# Pin
Not Active30-Jun-11 16:01
mentorNot Active30-Jun-11 16:01 
AnswerRe: Convert SQL Data Type To C# Pin
OriginalGriff30-Jun-11 22:08
mveOriginalGriff30-Jun-11 22:08 
AnswerRe: Convert SQL Data Type To C# Pin
Shameel30-Jun-11 22:30
professionalShameel30-Jun-11 22:30 
AnswerRe: Convert SQL Data Type To C# Pin
Mario Majčica1-Jul-11 0:31
professionalMario Majčica1-Jul-11 0:31 
AnswerRe: Convert SQL Data Type To C# Pin
PIEBALDconsult1-Jul-11 2:45
mvePIEBALDconsult1-Jul-11 2:45 
AnswerRe: Convert SQL Data Type To C# Pin
BobJanova1-Jul-11 3:08
BobJanova1-Jul-11 3:08 
AnswerRe: Convert SQL Data Type To C# Pin
RaviRanjanKr2-Jul-11 8:10
professionalRaviRanjanKr2-Jul-11 8:10 
QuestionIs an Array of Dictionaries the solution here? Pin
TheBlindWatchmaker30-Jun-11 13:31
TheBlindWatchmaker30-Jun-11 13:31 
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);
                }
            };
        }
    }
}

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.