I need a little assistance in developing objects in C#.
Why does my C# obj barf?????
In vb.net I'll create a class obj in vb called ValCriteria. Make it
serializable so make my call as small as possible. Declare my members and
get and set my properties. My constructor is usually left blank unless I'm
initializing a hashtable or something.
Public sub new()
End sub
Then I create a function that returns that obj like so...
Public Shared Function NewValCriteria() As ValCriteria
Return New ValCriteria
End Function
C# is different.
I create my members and properties. Set my constructor(ok by default its
created). Then I try to create my function to create the instance of my obj
and c# continues to barf. Any idea?
Namespace val.business
{
[Serializable ()]
Public class ValCriteria : myBaseClass
{
Public ValCriteria
{
//blank constructor
}
private string _criteriaOne;
public string criteriaOne
{
get
{
return _criteriaOne;
}
set
{
_criteriaOne = value;
}
}
public ValCriteria Load ()
{
return ValCriteria;
}
}
}
Thanks