Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
Microsoft
Communities 
 
Chat Transcript
 
Chat Topic : Serialization in .NET
Chat Expert : Sijin Joseph (MVP)
March 16, 2005
 
 
subhashini (Moderator):
Hi all the chat starts at 5.00 pm IST
subhashini (Moderator):
hello everbody . A very good evening to all of you. :-)
subhashini (Moderator):
Welcome to today's chat on Serialization in .NET
subhashini (Moderator):
We have Sijin Joseph with us today.
subhashini (Moderator):
To give you a quick intro about him
subhashini (Moderator):
Sijin Joseph started programming with GWBASIC in 1991. A geek in every sense of the word, he learnt C/C++, VC++, MFC, COM, .NET and has a passion for playing with cutting edge technologies and build cool products that make life and work easier.
subhashini (Moderator):
He graduated in Mathematics (2000) from St.Stephens College, Delhi and did his Masters in Computer Applications (2003) from Jawahar Lal Nehru University, Delhi. An avid gamer, he has a huge collection of games and spends quite a bit of his time playing online. His other interests include Genetics, Evolution and Artificial Intelligence.
subhashini (Moderator):
He started working with .NET in 2002 and has risen in love with it since then. An object and smart client bigot, he evangelizes smart clients because of the rich user experience. Nothing gives him more pleasure than to see a satisfied user of his software. He currently works with <http://www.coreobjects.com> CoreObjects (Bangalore) as a Senior Product Engineer.
subhashini (Moderator):
He has a .NET blog at <http://weblogs.asp.net/sjoseph> and a personal website and blog at <http://www.indiangeek.net>. He loves to talk about the latest in technology and solve interesting technical problems.
subhashini (Moderator):
Now before we start a few chat rules
subhashini (Moderator):
Please refrain from sending any private messages to the expert during the chat
subhashini (Moderator):
Chat Procedures:
This chat will last for one hour. During this hour, our Experts will respond to as many questions as they can. Please understand that there may be some questions we cannot respond to due to lack of information or because the information is not yet public. We encourage you to submit questions for our Experts. We ask that you stay on topic for
subhashini (Moderator):
the duration of the chat. This helps the Guests and Experts follow the conversation more easily. We invite you to ask off topic questions after this chat is over.
subhashini (Moderator):
So let's get the chat rolling
subhashini (Moderator):
And lets welcome Sijin
Sijin (Expert):
Hi everyone....
subhashini (Moderator):
Hi Sijin :-)
Sijin (Expert):
Q: is there any alternative improved mechanism for serializing dataset in higher versions of .Net ?, cause am frequently getting memmory exception(also its time comsuming) error when the row count is higher ..
A: In .Net 2.0 DataSet has a a property DataSet.RemotingFormat, you can set this property to SerializationFormat.Binary for better performance while serializing datasets.

Check out these links for more info
http://msdn.microsoft.com/msdnmag/issues/04/10/CuttingEdge/

http://codebetter.com/blogs/sahil.malik/archive/2004/12/12/36156.aspx

http://www.eggheadcafe.com/articles/20041128.asp
Sijin (Expert):
Before i start i would like to know some of your personal experiences with serialization and what it means to you....
Sijin (Expert):
sure HP...
Sijin (Expert):
Yes Arun.....but i'll be taking up questions in a few minutes....
Sijin (Expert):
Serialization is the process of converting an object or a graph of objects into a linear sequence of bytes for either storage or transmission to another location. Deserialization is the process of taking in stored information and recreating objects from it.
Sijin (Expert):
Ok...so let's start with the formal definition of serialization...
Sijin (Expert):
Now that's pretty technical...in simpler terms it means that you use serialization anytime you want to save the state of your objects or want to transport your objects over the wire....
Sijin (Expert):
In .net you use serialization anytime you use remoting to transport marshal-by-value objects..... ASP.Net webservices internally uses Xml Serialization
Sijin (Expert):
Some other uses of serialization....
Sijin (Expert):
Preserve the state of your application to persistent storage.
Distributed communication (Remoting and web services use serialization)
Deep copies of objects
Storing config information
Sijin (Expert):
i'll be sharing some code snippets on how to create deep copies using and store config info using serialization....
Sijin (Expert):
Ok now in .Net the serialziation support is in two namespaces....
Sijin (Expert):
System.Runtime.Serialization - The classes in this namespace facilitate “runtime serialization”. The goal here is to preserve as much type information as possible and then recreate the object with the type information on Deserialization. Requires that the objects have the Serializable attribute. And the Serialization Formatter permission is required which is only granted to local apps by default.
Sijin (Expert):
System.Xml.Serialization - The classes in this namespace facilitate XML serialization. The goal here is to provide a high performance mechanism to convert objects into XML. Only public fields and properties of the object are preserved. Used if communication between heterogeneous systems is required. Requires no special security permissions. Has a lot of restrictions as to what can be serialized and what cannot.
Sijin (Expert):
Let's start with runtime serialization....
Sijin (Expert):
Over here there are two aspects....What to serialize and the format in which the data is serialized.....
Sijin (Expert):
In .net we can do serialization using the Serializable attribute on our class or by implementing ISerializable interface.
In case we choose Serializable attribute the formatters use reflection to get the data that needs to be serialized. Binary and SoapFormatters will serialize every field in the object including private and protected ones. It does not serialize fields marked with the NonSerialized attribute.

If the object implements ISerializable it gets complete control over the serialization and deserialization process.
ISerializable has only one method GetObjectData(), for Deserialization a special ctor is required, Which should be made protected and private if the class is sealed.
Sijin (Expert):
There are two in built formatters in .Net which control the format in which data gets written...
Sijin (Expert):
BinaryFormatter
Writes the data to be serialized in binary format. Most efficient formatter but not useful for open systems.

SoapFormatter
Writes the data to be serialized in the SOAP 1.1 format. Less efficient but a must if interoperability is a requirement. Used by remoting.
Sijin (Expert):
Here is a code snippet that illustrates how to use simple runtime serialization via the [Serializable] attribute
Sijin (Expert):
[Serializable]
public class Customer
{
public string Name;
public ArrayList Orders = new ArrayList();

[NonSerialized]
public string DataThatShouldNotBeSerialized;

public Customer(string name)
{
this.Name = name;
}
}
Sijin (Expert):
[Serializable]
public class Order
{
public string Product;
public int Quantity;
public Customer Customer;

public Order(string product, int quantity, Customer customer)
{
this.Product = product;
this.Quantity = quantity;
this.Customer = customer;
}
}
Sijin (Expert):
Customer customer = new Customer("James");
customer.DataThatShouldNotBeSerialized = "Random data";
Order order1 = new Order("Motherboard", 2, customer);
Order order2 = new Order("CPU", 2, customer);
customer.Orders.Add(order1);
customer.Orders.Add(order2);

SoapFormatter formatter = new SoapFormatter();
FileStream stream = new FileStream("customer.xml", FileMode.Create);
formatter.Serialize(stream, customer);
stream.Close();
Sijin (Expert):
Now if we want more control over the serialization process, we can use the ISerializable interface...here is a code snippet that illustrates that....
Sijin (Expert):

[Serializable]
public class Customer : ISerializable
{
public string Name;
public ArrayList Orders = new ArrayList();

public string DataThatShouldNotBeSerialized;

public Customer(string name)
{
this.Name = name;
}

Sijin (Expert):

#region ISerializable Members

public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("Name", Name);
info.AddValue("Orders", Orders);
}

private Customer(SerializationInfo info, StreamingContext context)
{
Name = info.GetString("Name");
Orders = (ArrayList)info.GetValue("Orders", typeof(ArrayList));
}
#endregion
}
Sijin (Expert):

[Serializable]
public class Order
{
public string Product;
public int Quantity;
public Customer Customer;

public Order(string product, int quantity, Customer customer)
{
this.Product = product;
this.Quantity = quantity;
this.Customer = customer;
}
}
Sijin (Expert):

Customer customer = new Customer("James");
customer.DataThatShouldNotBeSerialized = "Random data";
Order order1 = new Order("Motherboard", 2, customer);
Order order2 = new Order("CPU", 2, customer);
customer.Orders.Add(order1);
customer.Orders.Add(order2);

SoapFormatter formatter = new SoapFormatter();
FileStream stream = new FileStream("customer.xml", FileMode.Create);
formatter.Serialize(stream, customer);
stream.Close();
Sijin (Expert):
Ok...Now one common problem that comes up with serialization that is versioning....
Sijin (Expert):
Suppose you serialize an object.....then later you make some changes to the object...say rename the class or add/remove some fields...
Sijin (Expert):
in this case deserialization will fail unless you take some steps to handle the versions....
Sijin (Expert):
Let's see the support .Net has for the same....
Sijin (Expert):
SerializationBinder
For Assembly and Type resolution. Allows you to handle things like change in class name, change in namespace etc.
Sijin (Expert):
Take a look at the sample here to see how the serializationbinder class helps you to manage changes in class and assembly names....
Sijin (Expert):
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemruntimeserializationserializationbinderclasstopic.asp>
Sijin (Expert):
SerializationSurrogate
A surrogate allows another class to handle the serialization of an object. Allows you to handle the case where there is an object that does not support serialization and cannot be inherited or wrapped. The problem here is that the surrogate receives a uninitialized object i.e. no constructors have run. Also can only access public fields and properties, has to resort to reflection to access private, protected members.
Sijin (Expert):
Take a look at some of these samples that use serializationsurrogates to do some cool stuff...
Sijin (Expert):
An implementation of serialization surrogate that uses reflection
<http://weblogs.asp.net/rosherove/archive/2005/03/03/384267.aspx>

Implementation of surrogates for binary serialization of datasets
<http://msdn.microsoft.com/msdnmag/issues/04/10/CuttingEdge/>
Sijin (Expert):
This site has a lot of good info on how to use surrogates... <http://www.topxml.com/xmlserializer/surrogateselectors.asp>
Sijin (Expert):
I'll be taking questions in a few minutes :) :)
Sijin (Expert):
Ok let's take a look at a code snippet that shows how you can do deep copies of objects using serialization
Sijin (Expert):
[Serializable]
public class Customer
{
public string Name;
public Address Address = new Address();

public Customer(string name)
{
this.Name = name;
}

public Customer DeepCopy()
{
MemoryStream stream = new MemoryStream();
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(stream, this);
stream.Seek(0, SeekOrigin.Begin);
Customer clone = (Customer)formatter.Deserialize(stream);
return clone;
}
Sijin (Expert):

public Customer ShallowCopy()
{
return (Customer)this.MemberwiseClone();
}
}

[Serializable]
public class Address
{
public string Street;
public string Pin;
public string City;
}
Sijin (Expert):
[STAThread]
static void Main(string[] args)
{
Customer obj1 = new Customer("Henry");
obj1.Address.City = "Bangalore";
obj1.Address.Street = "Banergatta";
obj1.Address.Pin = "560076";

Customer obj2 = (Customer)obj1.ShallowCopy();
Customer obj3 = (Customer)obj1.DeepCopy();

Debug.Assert(Object.ReferenceEquals(obj1.Name, obj2.Name));
Debug.Assert(Object.ReferenceEquals(obj1.Address, obj2.Address));

Debug.Assert(! Object.ReferenceEquals(obj1.Name, obj3.Name));

Sijin (Expert):
Debug.Assert(! Object.ReferenceEquals(obj1.Address, obj3.Address));

System.Console.ReadLine();
}
Sijin (Expert):
Ok...now let's come to Xml serialization.....
Sijin (Expert):
The class that is responsible for Xml serialization is XmlSerializer....
Sijin (Expert):
Allows objects to be stored in XML format. Webservices internally use XmlSerializer to convert objects into SOAP format. Focuses on mapping .Net classes to arbitrary XML formats or formats defined via a schema. Optimized for performance. Takes the type to serialize in the ctor and uses the type information to give high performance while serializing and deserializing. Works only with public field and properties(provided they have both get and set properties), this is to facilitate working in restricted conditions like the intranet and internet.
Sijin (Expert):
Now there are a lot of restrictions imposed on the types that can be serialzied by XmlSerializer....some are due to the fact that it has to run with no special permissions....and part are due to the current implementtion...
Sijin (Expert):
Restrictions on types that can be serialized using XmlSerializer
<http://www.topxml.com/xmlserializer/serializable_classes.asp>
Sijin (Expert):
XmlSerializer makes heavy use of attributes to control the serialization process....
Sijin (Expert):
Refer to these links to see how you can use attributes to control the format in which your objects get serialized to Xml
Sijin (Expert):
<http://www.topxml.com/xmlserializer/serialization_attributes.asp>

Attrbutes that control Xml Serialization
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconattributesthatcontrolserialization.asp>

Controlling Xml serialization using attributes
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcontrollingserializationbyxmlserializerwithattributes.asp>
Sijin (Expert):
DataSets are a special with respect serialization....the standard Xml serialization process won't work with datasets as it needs to serialize things such as DiffGrams...
Sijin (Expert):
so DataSet implements an interface called IXmlSerializable which it uses to take control over how the dataset gets converted to xml....
Sijin (Expert):
in .Net 1.1 this interface is not recommended for public use....but in .Net 2.0 this interface has been fully documented and can be used by objects which wish to gain more control over the Xml serialization process....
Sijin (Expert):
Another common issue that comes up with serialization is when you have declared events in your objects...and objects which cannot be serialized (for e.g. controls) hook into these events...
Sijin (Expert):
Now with runtime serialization all objects which hook into your event also get serialized....
Sijin (Expert):
to prevent this you need to apply the NonSerialized attribute with the field qualifier to your event to tell the formatter not to serialize the event handlers...
Sijin (Expert):
for e.g.
Sijin (Expert):
[field:NonSerialized]
public event EventHandler NameChanged;
Sijin (Expert):
Ok let's take a look at how we can use XmlSerialized to store strongly typed configuration information......
Sijin (Expert):
public class UserSettings
{
private Point _mainFormPosition = Point.Empty;
public Point MainFormPosition
{
get{ return _mainFormPosition; }
set{ _mainFormPosition = value; }
}

private Size _mainFormSize = Size.Empty;
public Size MainFormSize
{
get{ return _mainFormSize; }
set{ _mainFormSize = value; }
}


Sijin (Expert):
private float _conversionFactor = float.MinValue;
public float ConversionFactor
{
get{ return _conversionFactor; }
set{ _conversionFactor = value; }
}
}

Sijin (Expert):
[STAThread]
static void Main(string[] args)
{
UserSettings settings = new UserSettings();
settings.ConversionFactor = 10;
settings.MainFormPosition = new Point(100,100);
settings.MainFormSize = new Size(640, 480);

XmlSerializer serializer = new XmlSerializer(typeof(UserSettings));
XmlTextWriter writer = new XmlTextWriter("settings.xml", System.Text.Encoding.UTF8);
writer.Formatting = Formatting.Indented;
serializer.Serialize(writer, settings);
writer.Close();

}
Sijin (Expert):
The above class gets serialized as
Sijin (Expert):
<?xml version="1.0" encoding="utf-8"?>
<UserSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MainFormPosition>
<X>100</X>
<Y>100</Y>
</MainFormPosition>
<MainFormSize>
<Width>640</Width>
<Height>480</Height>
</MainFormSize>
<ConversionFactor>10</ConversionFactor>
</UserSettings>
Sijin (Expert):
Here are a couple of more samples that show some cool uses for XmlSerializer
Sijin (Expert):
Site settings using XmlSerializer
<http://codebetter.com/blogs/david.hayden/archive/2005/03/01/56226.aspx>

XmlSerializerSectionHandler
<http://pluralsight.com/wiki/default.aspx/Craig/XmlSerializerSectionHandler.html>
Sijin (Expert):
Let's see what's new in serialization in .Net 2.0
Sijin (Expert):
.Net 2.0 intrduces support to handle version changes...
Sijin (Expert):
there is a new attribute called OptionalField which you can use to mark a field as being new in a version....
Sijin (Expert):
This links discusses this and some new features in serialization in .Net
Sijin (Expert):
<http://msdn.microsoft.com/msdnmag/issues/04/10/AdvancedSerialization/default.aspx>
Sijin (Expert):
Also some new attributes have been introduced that let you get more control over the serialization process....
Sijin (Expert):
Here is a code snippet that illustrates that....
Sijin (Expert):
[Serializable]
public class Employee
{
private string _name;

public string Name
{
get{ return _name; }
set{ _name = value; }
}

public Employee(string name)
{
_name = name;
}

[OnSerializing]
private void OnSerializing(StreamingContext context)
{
Console.WriteLine("Serializing");
}
Sijin (Expert):
[OnSerialized]
private void OnSerialized(StreamingContext context)
{
Console.WriteLine("Serialized");
}

[OnDeserializing]
private void OnDeserializing(StreamingContext context)
{
Console.WriteLine("DeSerializing");
}

[OnDeserialized]
private void OnDeserialized(StreamingContext context)
{
Console.WriteLine("DeSerialized");
}
}
Sijin (Expert):
Employee emp = new Employee("Mark");

BinaryFormatter formatter = new BinaryFormatter();
FileStream stream = new FileStream("employee.dat", FileMode.Create);

formatter.Serialize(stream, emp);
stream.Seek(0, SeekOrigin.Begin);

emp = (Employee)formatter.Deserialize(stream);

stream.Close();
Sijin (Expert):
The output is...
Sijin (Expert):
This will output

Serializing
Serialized
Deserializing
Deserialized
Sijin (Expert):
Also SoapFormatter has been deprecated in .Net 2.0.... no new features have been added to it...
Sijin (Expert):
instead a new class called XmlFormatter has been introduced....
Sijin (Expert):
You can find more info on XmlFormatter at
Sijin (Expert):
More info at
<http://weblogs.asp.net/cschittko/archive/2003/10/29/34414.aspx>

<http://www.douglasp.com/CommentView.aspx?guid=bff35b26-4739-4971-9a05-507e5aaddd7a>
Sijin (Expert):
Ok i think we're running out of time....i'll post some of the stuff that i couldn't share and the rest of the stuff on my blog...
Sijin (Expert):
http://weblogs.asp.net/sjoseph
Sijin (Expert):
Ok...let me take some questions now....
Sijin (Expert):
Q: Untyped dataset is serialized by default
A: Yes
Sijin (Expert):
Q: Is it ArrayList Serializable
A: Yes it can be serialized by both runtime serializers as well as XmlSerializer....
Sijin (Expert):
Q: is Serialization only meant for Remoting, passing objects from 1 appdomain to another.
A: No it can also be used to save the state of your objects. For example suppose you are writing an editor app, you can store the state of your objects using serialization to get a quick sae and load capability....
Sijin (Expert):
Q: hi Sijin thanks for the answer, but what will do for all the existing code we have written, because we gonna get two diferent versions of datset right ?
A: Yes, currently the only solution would be to use some kind of compression with standard xml serialization....
Sijin (Expert):
Q: How many kind of serialization available in .Net
A: Runtime serialization and Xml serialization....
Sijin (Expert):
Q: What is the performance difference if we use BinaryFormatter's Serialize and Deserialize methods and if we make custom Serialize/Deserialize methods? and what may be reason behind it? Any Idea?
A: Writing a custom formatter is not an easy job, one of the complications comes from making sure that cyclic references in the object graph get serialized properly....
Sijin (Expert):
Q: If I say time taken for serilization(in any serilization method), is not reasonable in real time environment. When developing custom serilization classes, the control hanging up inside ISerial.GetObjectData for quite long time, how to overcome this issue ?
A: Well this is quite specific to your application. But i wouldn't recommend using serialization for real-time systems as you cannot give any time guaruntee on the time taken for serializing an object....
Sijin (Expert):
Q: Is Datarow object is serialized?
A: No a DataRow object on it's own cannot be serialized.... you have to use a surrogate to serialize a DataRow
Sijin (Expert):
Q: Can I Use an object which XMLSerialized in .net in Java?
A: Good question. This is the exact use for which XmlSerializer was built... yes a class that has been serialized using XmlSerialzier can be used in .Net.... WEbServices internally use XmlSerializer for serializing messages and objects....
Sijin (Expert):
Q: In the configuration type scenario, is it a good way to use serialization of a given object and than store a xml string into session?
A: Yes, the advantage you gain here is of strong typing of your properties....Another good use case is with smart clients....instead of using the normal app.config you can use serialization to store strongly types user properties on a per user basis....
Sijin (Expert):
Q: Why to Use Serialize can't we directly send data across net ?
A: Sure you can....you can also write your code in assembly :) The reason for using serialization is that the .Net infrastructure provides a lot of support in serializing and deserializing your obejcts.... better to use that rather than rolling your own..... but if you are talking about raw data then serialization is not meant for that although you can use it.
subhashini (Moderator):
We can extend the chat for 15 more minutes
subhashini (Moderator):
In case your queries are not answered , please feel free to email sijin
subhashini (Moderator):
at sijin@indiangeek.net
Sijin (Expert):
Q: If that is so (ie you can use .Net XMLSerialized Object in Java), If you deserialize in Java to Use, What is the guarentee that that perticular Class will be there in Java to again conver back to Object. For Example Dataset.
A: The catch here is that type information is not stored while using XmlSerializer...so Java does not know that the data is supposed to be deserialzied into a type such as DataSet, you can read the XML data and populate your own equivalent of dataset in java.....
Sijin (Expert):
Q: Windows Hibernate property using any kind Serilization :)
A: I am sure it is... but not .Net serialization....maybe in 2010 :)
Sijin (Expert):
Q: Pratap: A surrogate allows another class to handle the serialization of an object. Allows you to handle the case where there is an object that does not support serialization and cannot be inherited or wrapped .... does this means any object can be serializ
A: Yes, provided you know enough about the object and have the required permissions....You will mmost probably need to use reflection to get/set the private/protected members of the object.... Also when the object is given to the surrogate no constructors have been run so that is an additional thing you need to keep in mind....
Sijin (Expert):
Q: so always try to keep few letter words when in xml serilization ?
A: Can you clarify?
Sijin (Expert):
Q: how to improve serialization performance ?
A: Any specific cases you have in mind?
Sijin (Expert):
Q: so if i want to serialze an object first i have to convert it into a file and i need maintain file for deserialize it
A: You have to convert an object to a stream, the stream might be a file on disk, a memory stream or a network stream....
Sijin (Expert):
Q: what is state of an object ?
A: State of an object are the values of all it's fields ....
Sijin (Expert):
Q: This xml serialization serilizes xml docs and streams. any other formats it can serialize?
A: xml serialization serializes to streams.... again the stream can be from a file, an in-memory stream or a network stream...
Sijin (Expert):
Q: ( few letter words) means, better field description(field name, when serilg dbs data) must be in few characters when using xml serialization, other wise data descriptor would be more than datA:) right ?
A: It's a matter of choice, and you can control the tag that gets created for a field using attributes.... so it's not necessary that the name of the field is also the name of the tag that gets generated...see here for more info on how you can control the xml serialization process using attributes...http://www.topxml.com/xmlserializer/xmlserializer_attributes.asp
Sijin (Expert):
Q: serialization is only converting to streams isit ?
A: yes from a tol-level view... serialization is the process of converting object graphs to a byte representation....
Sijin (Expert):
Q: why do we need serialization ?
A: You can use serialization for the tasks that i have mentioned at the start....Preserve the state of your application to persistent storage.
Distributed communication (Remoting and web services use serialization)
Deep copies of objects
Storing config information
Sijin (Expert):
Q: (improve serialization performance) any on the fly compression serialization is available ?
A: Sure, you just serialize to a memory stream and then put the memory stream through an compression stream like that available from SharpZipLib http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx you will ahve to do the reverse process while deserializing....
Sijin (Expert):
Q: Dataset surrogate is a better alternative, what u say ?
A: better alternative to what?
Sijin (Expert):
Q: why i need to save the state of my object ?
A: For example, you might have an object that stores user specific settings, you can use serialization to save/restore this object from disk, this prevents you from having to manually write code to store the info in your object to disk...
Sijin (Expert):
Q: Which objects cant be serialzed
A: Windows forms controls cannot be serialized....other than that....XmlSerializer has a lot of restrictions on the types that it can serialize... take a look here for more info... http://www.topxml.com/xmlserializer/serializable_classes.asp
Sijin (Expert):
Q: Better alternative to Dataset serilization related problems, which one would be better .Net 2.0 dataset or sorrogate class ?
A: Well if you can wait .Net 2.0 datasets is a better solution.... otherwise using a surrogate is the only option that you have...
Sijin (Expert):
Q: Is there any good replacement we have for MemoryStream? because it makes sometime great perfomance loss when we use it for somewhat big data array in stream?
A: Well, not that i am aware of. But an interesting experiment would be to try and use reflector to see what goes on inside the MemoeryStream, you might be able to find a specific optimization for your case.
Sijin (Expert):
Q: who is responsible for serialization and deserialization
A: Can you be more specific? :)
Sijin (Expert):
Q: One more question, why Microsoft couldnt find out issues related to Serilization when they release 1.1 ?
A: Well, i am not an microsoft employee, but let me ask you this, would you have rather waited for a couple of more years as MS tested .Net internally to ensure that all issues have been resolved? There is no guaruntee that even then there would be no issues.
Sijin (Expert):
Q: In the definition: converts into common language runtime objects why they mentioned as (CLR) objects
A: where is this definition... i guess by CLR objects are the normal .Net objects you use in your app... not sure what context this is in....
Sijin (Expert):
Q: How the serialization works with remoting? I mean what's it's relation with transparent proxy
A: Remoting uses serialization to transport marshal-by-value objects across the wire
Sijin (Expert):
hey guys please feel free to contact me at sijin@indiangeek.net for any queries that you may have....
Sijin (Expert):
you can also catch me on IM... sijinjoseph@hotmail.com
subhashini (Moderator):
So this brings
subhashini (Moderator):
us to teh end of the chat
subhashini (Moderator):
so feel free to contact Sijin
subhashini (Moderator):
if you have any queries
subhashini (Moderator):
Hope the chat was useful and informative
subhashini (Moderator):
All of you have a lovely evening
subhashini (Moderator):
and catch you guys again next wednesday :-)
subhashini (Moderator):
The transcript of this chat will be available at http://www.microsoft.com/india/communities/chat/Transcripts.aspx
Sijin (Expert):
and i'll be posting my notes on http://weblogs.asp.net/sjoseph
Sijin (Expert):
sure tamoC love to help you out anytime buddy :)
subhashini (Moderator):
great
subhashini (Moderator):
Thanks Sijin
subhashini (Moderator):
for such an informative chat session :-)
Sijin (Expert):
Thank you everyone for attending...had a lot of fun....improved my typing skills :D:D
Sijin (Expert):
Hope to catch you all next wednesday for the chat on Sql 2005....going to be real fun...
subhashini (Moderator):
If you guys wanna host a chat , mail me the topic and a convenient date at commind@microsoft.com
subhashini (Moderator):
have a lovely evening :-)

 
     

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement