On 10/18/06, Manoj Aggarwal <[EMAIL PROTECTED]> wrote:
Can you please explain why is it so...
Also It will be helpful if u can explain what is "datarow with parameterless
constructor", an example will help me a long way
The .net framework must be able to construct a class from it serialized form.
In other words the class must be deserializable.
Therefor it mandate the class to have a parameterless constructor.
class Foo
{
public Foo() { /* do something neat */ }
}
class Bar
{
public Bar(int value) { /* do something neat */ }
}
class Bar doesnt have a parameterless ctor, it wants an int.
The .net framework cannot simple know what value it should pass,
therefor it can deserialize class Foo but not class Bar.
HTH
// Ryan
===================================
This list is hosted by DevelopMentorĀ® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com