Click here to Skip to main content
15,921,793 members
Home / Discussions / C#
   

C#

 
GeneralRe: AppDomain.Unload() doesn't release assemblies? Pin
EssOEss16-Aug-05 5:25
EssOEss16-Aug-05 5:25 
GeneralRe: AppDomain.Unload() doesn't release assemblies? Pin
S. Senthil Kumar16-Aug-05 5:34
S. Senthil Kumar16-Aug-05 5:34 
GeneralRe: AppDomain.Unload() doesn't release assemblies? Pin
EssOEss16-Aug-05 8:05
EssOEss16-Aug-05 8:05 
AnswerRe: AppDomain.Unload() doesn't release assemblies? Pin
leppie16-Aug-05 0:55
leppie16-Aug-05 0:55 
GeneralRe: AppDomain.Unload() doesn't release assemblies? Pin
EssOEss16-Aug-05 5:23
EssOEss16-Aug-05 5:23 
GeneralHELP with deserialization Pin
Max Silberztein15-Aug-05 10:31
Max Silberztein15-Aug-05 10:31 
GeneralRe: HELP with deserialization Pin
Charlie Williams15-Aug-05 12:15
Charlie Williams15-Aug-05 12:15 
GeneralRe: HELP with deserialization Pin
Max Silberztein15-Aug-05 15:27
Max Silberztein15-Aug-05 15:27 
Charlie Thanks for your help!

(1) When I use the method:

public Type BindToType (string assemblyName,string typeName)
{
return typeof (Grammar);
}

I get the exception message:

Possible Version mismatch. Type Nooj.Grammar has 36 members, number of members deserializes is 1.

but I have not changed anything in the definition of "Grammar"! There were
36 members, and they all are still there...

(2) If I use another version of the method (got from MSDN):

public Type BindToType (string assemblyName,string typeName)
{
Type typeToDeserialize = Type.GetType (String.Format("{0}, {1}", "Grammar", assemblyName));
return typeToDeserialize;
}

I then get the Exception message:

Type is not resolved for member Nooj.Grammar, Nooj, Version=1.0.1916.21705, Culture=neutral, PublicKeyToken=null.

(3) I noticed in MSDN that their new Version2Type (i.e. my "new" Grammar type) follows the interface "ISerializable". Therefore I tried to implement it (without the [] otherwiser it does not compile):

void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("x", x);
info.AddValue("y", y);
// ... all the 36 fields
}

as well as:

private Grammar (SerializationInfo info, StreamingContext context)
{
x = info.GetInt32("x");
y = info.GetInt32("y");
// ... this would not be feasible because some of the fields are complex recursive objects...
}

but then I got the exception message:

Exception has been thrown by the target of an invocation

Any idea?
--Max

GeneralRe: HELP with deserialization Pin
Silberztein23-Aug-05 14:24
Silberztein23-Aug-05 14:24 
QuestionHow to catch Paste on Ctrl+V (RichTextBox) Pin
cbadal15-Aug-05 10:02
cbadal15-Aug-05 10:02 
AnswerRe: How to catch Paste on Ctrl+V (RichTextBox) Pin
gnjunge15-Aug-05 10:23
gnjunge15-Aug-05 10:23 
AnswerRe: How to catch Paste on Ctrl+V (RichTextBox) Pin
Mohamad Al Husseiny15-Aug-05 10:28
Mohamad Al Husseiny15-Aug-05 10:28 
GeneralRe: How to catch Paste on Ctrl+V (RichTextBox) Pin
cbadal15-Aug-05 10:41
cbadal15-Aug-05 10:41 
Questionhow can i read the pressed key from windows Pin
m.rastgar15-Aug-05 9:57
m.rastgar15-Aug-05 9:57 
AnswerRe: how can i read the pressed key from windows Pin
Mohamad Al Husseiny15-Aug-05 10:10
Mohamad Al Husseiny15-Aug-05 10:10 
GeneralRe: how can i read the pressed key from windows Pin
m.rastgar15-Aug-05 11:42
m.rastgar15-Aug-05 11:42 
QuestionHow to build a byte from a BitArray? Pin
bouli15-Aug-05 7:44
bouli15-Aug-05 7:44 
AnswerRe: How to build a byte from a BitArray? Pin
Guffa15-Aug-05 8:13
Guffa15-Aug-05 8:13 
GeneralRe: How to build a byte from a BitArray? Pin
bouli15-Aug-05 8:46
bouli15-Aug-05 8:46 
GeneralRe: How to build a byte from a BitArray? Pin
Guffa15-Aug-05 9:01
Guffa15-Aug-05 9:01 
GeneralRe: How to build a byte from a BitArray? Pin
bouli15-Aug-05 11:19
bouli15-Aug-05 11:19 
GeneralRe: How to build a byte from a BitArray? Pin
leppie15-Aug-05 10:27
leppie15-Aug-05 10:27 
QuestionHow to make ListBox multiselect Pin
zaboboa15-Aug-05 7:11
zaboboa15-Aug-05 7:11 
AnswerRe: How to make ListBox multiselect Pin
Guffa15-Aug-05 7:38
Guffa15-Aug-05 7:38 
AnswerRe: How to make ListBox multiselect Pin
Mohamad Al Husseiny15-Aug-05 7:39
Mohamad Al Husseiny15-Aug-05 7:39 

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.