Click here to Skip to main content
15,899,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: MenuStrip -> Open new child form Pin
benjamin yap13-May-08 4:48
benjamin yap13-May-08 4:48 
GeneralRe: MenuStrip -> Open new child form Pin
Gareth H13-May-08 4:52
Gareth H13-May-08 4:52 
GeneralRe: MenuStrip -> Open new child form Pin
benjamin yap13-May-08 5:00
benjamin yap13-May-08 5:00 
AnswerRe: MenuStrip -> Open new child form Pin
darkelv13-May-08 5:13
darkelv13-May-08 5:13 
GeneralRe: MenuStrip -> Open new child form Pin
benjamin yap13-May-08 5:24
benjamin yap13-May-08 5:24 
GeneralRe: MenuStrip -> Open new child form Pin
darkelv13-May-08 17:33
darkelv13-May-08 17:33 
QuestionResizing form nad positioning controls Pin
benjamin yap13-May-08 4:16
benjamin yap13-May-08 4:16 
QuestionXMLSerializer Pin
George_George13-May-08 4:12
George_George13-May-08 4:12 
Hello everyone,


Two questions about XMLSerializer.

http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer(VS.80).aspx

1.

It is mentioned -- "To increase performance, the XML serialization infrastructure dynamically generates assemblies to serialize and deserialize specified
types."

What means the assemblies?

2.

For the following sample, why creates two XMLSerializer instances, one is s and the other is ser?

Hashtable serializers = new Hashtable();

// Use the constructor that takes a type and XmlRootAttribute.
XmlSerializer s = new XmlSerializer(typeof(MyClass), myRoot);

// Implement a method named GenerateKey that creates unique keys 
// for each instance of the XmlSerializer. The code should take 
// into account all parameters passed to the XmlSerializer 
// constructor.
object key = GenerateKey(typeof(MyClass), myRoot);

// Check the local cache for a matching serializer.
XmlSerializer ser = (XmlSerializer)serializers[key];
if (ser == null) 
{
    ser = new XmlSerializer(typeof(MyClass), myRoot);
    // Cache the serializer.
    serializers[key] = ser;
}
else
{
    // Use the serializer to serialize, or deserialize.
}



thanks in advance,
George
AnswerRe: XMLSerializer Pin
led mike13-May-08 4:29
led mike13-May-08 4:29 
GeneralRe: XMLSerializer Pin
George_George13-May-08 4:49
George_George13-May-08 4:49 
AnswerRe: XMLSerializer Pin
Nissim Salomon13-May-08 4:40
Nissim Salomon13-May-08 4:40 
GeneralRe: XMLSerializer Pin
George_George13-May-08 4:48
George_George13-May-08 4:48 
QuestionBeginner's C# Book Pin
Ken Mazaika13-May-08 4:11
Ken Mazaika13-May-08 4:11 
AnswerRe: Beginner's C# Book Pin
CPallini13-May-08 4:21
mveCPallini13-May-08 4:21 
GeneralRe: Beginner's C# Book [modified] Pin
carbon_golem13-May-08 5:14
carbon_golem13-May-08 5:14 
GeneralRe: Beginner's C# Book Pin
CPallini13-May-08 5:20
mveCPallini13-May-08 5:20 
GeneralRe: Beginner's C# Book Pin
Hamid_RT13-May-08 5:28
Hamid_RT13-May-08 5:28 
GeneralRe: Beginner's C# Book Pin
CPallini13-May-08 5:34
mveCPallini13-May-08 5:34 
GeneralRe: Beginner's C# Book Pin
Hamid_RT13-May-08 5:47
Hamid_RT13-May-08 5:47 
GeneralRe: Beginner's C# Book Pin
CPallini13-May-08 5:51
mveCPallini13-May-08 5:51 
GeneralRe: Beginner's C# Book Pin
Hamid_RT13-May-08 5:55
Hamid_RT13-May-08 5:55 
GeneralRe: Beginner's C# Book Pin
Hamid_RT13-May-08 5:27
Hamid_RT13-May-08 5:27 
GeneralRe: Beginner's C# Book Pin
ToreUp13-May-08 6:21
ToreUp13-May-08 6:21 
GeneralRe: Beginner's C# Book Pin
carbon_golem13-May-08 7:27
carbon_golem13-May-08 7:27 
AnswerRe: Beginner's C# Book Pin
Hamid_RT13-May-08 5:25
Hamid_RT13-May-08 5:25 

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.