S
sk.rasheedfarhan
Hi ,
I am using C#
I am having 4 classes. like below.
public class A
{
String m_strRuleName;
String m_strRuleGuid;
// Some member functions.
public Object NextItem;
}
In public class B
{
String m_strCategoryName;
String m_strCategoryGuid;
// Some member functions.
public Object NextItem;
}
In public class C
{
String m_strPackName;
String m_strPackGuid;
// Some member functions.
public Object NextItem;
}
My problem is,
Step 1)Can I use the reusability concept here by declaring
the member variable in only one class and using for rest of the class
also.
Like public class A
{
String m_strName;
String m_strGuid;
public Object NextItem;
}
public class B
{
// Some member functions.
public Object NextItem;
}
etc....
Step 2) I am using list of objects for each class [A,B,C]. So when
I will retrieving data of each class, I have to get the data.
Now I am doing individually by creating list of objects of each class
[with its member variable and member functions ] and getting the data
from a loop. [for this I am using Linked list conecpt].
But I have to use Reusability concepts in my program so please any body
help out.
can we create a class like step1 and step2, if such so please tell me,
wat i need to do.
Regards,
Rs.
I am using C#
I am having 4 classes. like below.
public class A
{
String m_strRuleName;
String m_strRuleGuid;
// Some member functions.
public Object NextItem;
}
In public class B
{
String m_strCategoryName;
String m_strCategoryGuid;
// Some member functions.
public Object NextItem;
}
In public class C
{
String m_strPackName;
String m_strPackGuid;
// Some member functions.
public Object NextItem;
}
My problem is,
Step 1)Can I use the reusability concept here by declaring
the member variable in only one class and using for rest of the class
also.
Like public class A
{
String m_strName;
String m_strGuid;
public Object NextItem;
}
public class B
{
// Some member functions.
public Object NextItem;
}
etc....
Step 2) I am using list of objects for each class [A,B,C]. So when
I will retrieving data of each class, I have to get the data.
Now I am doing individually by creating list of objects of each class
[with its member variable and member functions ] and getting the data
from a loop. [for this I am using Linked list conecpt].
But I have to use Reusability concepts in my program so please any body
help out.
can we create a class like step1 and step2, if such so please tell me,
wat i need to do.
Regards,
Rs.