Click here to Skip to main content
15,887,425 members
Home / Discussions / C#
   

C#

 
QuestionForm inside Form bug in .net? Pin
Bog26-Nov-02 11:59
Bog26-Nov-02 11:59 
AnswerI should have mentioned Pin
Bog26-Nov-02 12:14
Bog26-Nov-02 12:14 
GeneralC# bookshelf Pin
Michael P Butler26-Nov-02 11:20
Michael P Butler26-Nov-02 11:20 
GeneralRe: C# bookshelf Pin
Christian Graus26-Nov-02 11:22
protectorChristian Graus26-Nov-02 11:22 
GeneralRe: C# bookshelf Pin
leppie26-Nov-02 11:39
leppie26-Nov-02 11:39 
GeneralFilling in the holes Pin
Michael P Butler26-Nov-02 10:58
Michael P Butler26-Nov-02 10:58 
GeneralRe: Filling in the holes Pin
Stephane Rodriguez.26-Nov-02 11:03
Stephane Rodriguez.26-Nov-02 11:03 
GeneralOK, what do make of this? Reloading an assembly Pin
leppie26-Nov-02 10:27
leppie26-Nov-02 10:27 
Hi all

I stumbled upon this beauty. For thos that has been here for a while you know the problem with un/loading an assembly (and overwrting it for that matter). IOW the basic idea of a plugin DLL. I'm not sure if the solution will fit all, but it does work in my case and well too! Smile | :)

//my uber loadfrom fix :D
//the following replaces Assembly.LoadFrom()
FileStream stream = File.OpenRead(assemblydll.Text);
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, (int)stream.Length);
stream.Close();
File.Delete(assemblydll.Text);
Assembly asm = Assembly.Load(buffer);

Now the assembly is in memory.

OK the BIG FAT question is, what happens when we reload an updated assembly?

With my limited testing it seems the assembly is present multiple times when calling AppDomain.CuurentDomain.GetAssemblies(), but on invoking a method via Reflection seems to target the last assemby loaded, thus amking it perfect for plugin type assemblies. And saves you from AppDomain HELL.

Hope this helps someone in the future Smile | :)


DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET popularity better now, thank you Smile | :)
GeneralRe: OK, what do make of this? Reloading an assembly Pin
David Stone26-Nov-02 12:07
sitebuilderDavid Stone26-Nov-02 12:07 
GeneralRe: OK, what do make of this? Reloading an assembly Pin
leppie26-Nov-02 12:31
leppie26-Nov-02 12:31 
GeneralRe: OK, what do make of this? Reloading an assembly Pin
David Stone27-Nov-02 16:24
sitebuilderDavid Stone27-Nov-02 16:24 
QuestionConverting a HIMAGELIST to an ImageList? Pin
Zombies with Coffee, LLC26-Nov-02 9:21
professionalZombies with Coffee, LLC26-Nov-02 9:21 
AnswerRe: Converting a HIMAGELIST to an ImageList? Pin
NormDroid26-Nov-02 10:05
professionalNormDroid26-Nov-02 10:05 
GeneralRe: Converting a HIMAGELIST to an ImageList? Pin
Zombies with Coffee, LLC26-Nov-02 10:10
professionalZombies with Coffee, LLC26-Nov-02 10:10 
GeneralReboot a Server with C# Pin
athomas421926-Nov-02 9:14
athomas421926-Nov-02 9:14 
GeneralRe: Reboot a Server with C# Pin
NormDroid26-Nov-02 10:02
professionalNormDroid26-Nov-02 10:02 
GeneralRe: Reboot a Server with C# Pin
J.Liss26-Nov-02 13:47
J.Liss26-Nov-02 13:47 
GeneralRe: Reboot a Server with C# Pin
athomas421927-Nov-02 3:39
athomas421927-Nov-02 3:39 
GeneralRe: Reboot a Server with C# Pin
thematt27-Nov-02 7:03
thematt27-Nov-02 7:03 
GeneralRe: Reboot a Server with C# Pin
athomas42192-Dec-02 3:27
athomas42192-Dec-02 3:27 
GeneralSNMP Provider for WMI Pin
thematt26-Nov-02 7:20
thematt26-Nov-02 7:20 
GeneralRe: SNMP Provider for WMI Pin
J.Liss26-Nov-02 13:58
J.Liss26-Nov-02 13:58 
GeneralRe: SNMP Provider for WMI Pin
thematt27-Nov-02 7:10
thematt27-Nov-02 7:10 
GeneralRe: SNMP Provider for WMI Pin
J.Liss27-Nov-02 7:29
J.Liss27-Nov-02 7:29 
Generalowner draw of listview and treeview Pin
Shaun Wilde26-Nov-02 3:21
Shaun Wilde26-Nov-02 3:21 

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.