I've declared a list in a class. I want to access the list from another class. How can I access the list from a module of another class?
// ClsUser.cs
namespace WebLll.ApiPayment.BusinessObject
{
public class ClsUser
{
Data.MyEntity db = new Data.MyEntity("MyEntity1");
public List<Data.GetPaymentRslt> BRIlstTxn = db.GetPayment(obj.PaymentCode, dtFrom, dtTo, obj.PaymentMode).ToList();
//... remaining code
}
}
// clsWebLllAPI.cs
namespace WebLll.ApiPayment.BusinessObject
{
public class clsWebLllAPI : clsBaseApi
{
public void Initialize(api_rule_setup obj)
{
// access the BRIlstTxn here
}
}
}