P
pokémon
In my constructors, I am passing in a DataRow object, then setting the
members based on the field values. For example:
class MyClass {
int member1 = 0;
public MyClass(DataRow dr) {
this.member1 = (int)dr["FIELD1"];
}
}
I have to do this for potentially a lot of objects.
I am wondering, is there a better approach to achiving this functionality?
Suggestions/Critique welcome. Thanks in advance.
-KJ
members based on the field values. For example:
class MyClass {
int member1 = 0;
public MyClass(DataRow dr) {
this.member1 = (int)dr["FIELD1"];
}
}
I have to do this for potentially a lot of objects.
I am wondering, is there a better approach to achiving this functionality?
Suggestions/Critique welcome. Thanks in advance.
-KJ