In c#, compiler provides default parameter-less constructor if you dont create one. So your code above should work without having u to do anything extra, unless you have not written any parameterized constructors.
You have declared 'row' to be of type DataSet1.ProductRow. This doesn't look right, I am guessing that DataSet1 is a variable and not a type (of type DataSet, maybe). Basically, to the left of the variable name 'row' you will need to have the name of a
class.
What is ProductRow? Is it a class, variable, a field? Can you show how it is defined? Can you show the definition of DataSet1?
Can I suggest that you spend some time reading the book in my signature? The book will give you a much better grounding in c#.
Jahangeer
Member
5 Points
50 Posts
constructor
May 21, 2012 06:31 PM|LINK
how to create constructor that makes 0 arguments.
plz help me i'm stick.
i have no idea about it i need to create constructor for Dataset1.ProductRow(); to use this method
niksv
Contributor
5925 Points
1115 Posts
Re: constructor
May 21, 2012 07:11 PM|LINK
In c#, compiler provides default parameter-less constructor if you dont create one. So your code above should work without having u to do anything extra, unless you have not written any parameterized constructors.
Refer this to clear your constructor concepts: http://msdn.microsoft.com/en-us/library/ace5hbzh.aspx
Paul Linton
Star
13431 Points
2535 Posts
Re: constructor
May 21, 2012 10:21 PM|LINK
You have declared 'row' to be of type DataSet1.ProductRow. This doesn't look right, I am guessing that DataSet1 is a variable and not a type (of type DataSet, maybe). Basically, to the left of the variable name 'row' you will need to have the name of a class.
What is ProductRow? Is it a class, variable, a field? Can you show how it is defined? Can you show the definition of DataSet1?
Can I suggest that you spend some time reading the book in my signature? The book will give you a much better grounding in c#.