Click here to Skip to main content
15,911,360 members
Home / Discussions / C#
   

C#

 
GeneralRe: Like in Outlook Pin
naglbitur27-Mar-06 4:47
naglbitur27-Mar-06 4:47 
QuestionHow hard can it be..? Pin
magja26-Mar-06 23:08
magja26-Mar-06 23:08 
AnswerRe: How hard can it be..? Pin
mav.northwind27-Mar-06 0:42
mav.northwind27-Mar-06 0:42 
AnswerRe: How hard can it be..? Pin
V.27-Mar-06 1:08
professionalV.27-Mar-06 1:08 
QuestionProblem with int Pin
AnhTin26-Mar-06 23:07
AnhTin26-Mar-06 23:07 
AnswerRe: Problem with int Pin
Guffa26-Mar-06 23:17
Guffa26-Mar-06 23:17 
AnswerRe: Problem with int Pin
Stefan Troschuetz26-Mar-06 23:21
Stefan Troschuetz26-Mar-06 23:21 
QuestionHow can I unload the assembly in c# Pin
sinbao26-Mar-06 22:22
sinbao26-Mar-06 22:22 
i have winapp that use dll (assembly)
im createing in runtime object from the assembly.
then destroy this object.

THEN , while the winapp is STILL RUNNING , i want to Recompile the dll (assembly) , and to use the winapp AGAIN to create object from that assembly .(this way i could ,change the code of the object ,if i found bug, and use it again).



since there was no method like Assembly.Unload(), I use AppDomain,
but with that I still can't unload the assembly.


Here is what my program going

---
class Program
{
static void Main(string[] args)
{
MyTest.Test();
}
}


public class MyTest
{
public static void Test()
{
string assemblyFile = @"D:\XC.dll"; //(1)

string typeName = "XC.Form1"; //(2)


AppDomain appDomain = AppDomain.CreateDomain("Domain test");

try
{
ObjectHandle oh = appDomain.CreateComInstanceFrom(assemblyFile, typeName);
object o = oh.Unwrap();
IXC ixc = (IXC)o; //(3)
}
catch (Exception ex)
{
}
}
};
--
(1)the assebmly file path I want to load
(2)the Type I want to create which implement the IXC interface, and the IXC interface was in the assembly "develop.dll" which is used by the winapp
(3) when it goes to here, I got a exception:
$exception {"Type 'XC.Form1' in assembly 'XC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable."} System.Exception {System.Runtime.Serialization.SerializationException}
--

Any help would be appretiated!

Aaron Lu
AnswerRe: How can I unload the assembly in c# Pin
leppie26-Mar-06 23:26
leppie26-Mar-06 23:26 
GeneralRe: How can I unload the assembly in c# Pin
sinbao30-Mar-06 1:27
sinbao30-Mar-06 1:27 
AnswerRe: How can I unload the assembly in c# Pin
Nicholas Butler27-Mar-06 1:35
sitebuilderNicholas Butler27-Mar-06 1:35 
Questionhow to write a sliding number code?? Pin
wadever4ever26-Mar-06 22:18
wadever4ever26-Mar-06 22:18 
GeneralRe: how to write a sliding number code?? Pin
Guffa26-Mar-06 22:53
Guffa26-Mar-06 22:53 
QuestionNot eble to call AJAX method.... Pin
Jax_qqq26-Mar-06 21:30
Jax_qqq26-Mar-06 21:30 
GeneralRe: Not eble to call AJAX method.... Pin
Guffa26-Mar-06 22:56
Guffa26-Mar-06 22:56 
GeneralRe: Not eble to call AJAX method.... Pin
J4amieC26-Mar-06 23:18
J4amieC26-Mar-06 23:18 
GeneralRe: Not eble to call AJAX method.... Pin
Guffa27-Mar-06 0:31
Guffa27-Mar-06 0:31 
GeneralRe: Not eble to call AJAX method.... Pin
J4amieC27-Mar-06 0:55
J4amieC27-Mar-06 0:55 
GeneralRe: Not eble to call AJAX method.... Pin
Guffa27-Mar-06 1:23
Guffa27-Mar-06 1:23 
GeneralRe: Not eble to call AJAX method.... Pin
J4amieC27-Mar-06 3:30
J4amieC27-Mar-06 3:30 
GeneralRe: Not eble to call AJAX method.... Pin
Jax_qqq26-Mar-06 23:26
Jax_qqq26-Mar-06 23:26 
GeneralRe: Not eble to call AJAX method.... Pin
Guffa27-Mar-06 1:22
Guffa27-Mar-06 1:22 
GeneralRe: Not eble to call AJAX method.... Pin
Jax_qqq27-Mar-06 1:46
Jax_qqq27-Mar-06 1:46 
GeneralRe: Not eble to call AJAX method.... Pin
Guffa27-Mar-06 2:25
Guffa27-Mar-06 2:25 
GeneralRe: Not eble to call AJAX method.... Pin
Jax_qqq27-Mar-06 16:47
Jax_qqq27-Mar-06 16:47 

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.