से पैरामीटर कम पहुंच योग्य है, मैं एक फॉर्म क्लास से दूसरी सूची में एक सूची उत्तीर्ण करने की कोशिश कर रहा हूं।पैरामीटर
List<Branch> myArgus = new List<Branch>();
private void btnLogin_Click(object sender, EventArgs e)
{
// Get the selected branch name
string selectedBranch = lbBranches.SelectedItem.ToString();
for (int i = 0; i < myArgus.Count; i++)
{
if (myArgus[i]._branchName == selectedBranch)
{
// Open the BranchOverview form
BranchOverview branchOverview = new BranchOverview(myArgus[i]);
branchOverview.Show();
}
else
{
// Branch doesn't exist for some reason
}
}
}
और फिर मेरी BranchOverview
कक्षा में: कोड यह
Inconsistent accessibility: parameter type 'System.Collections.Generic.List<Argus.Branch>' is less accessible than method 'Argus.BranchOverview.BranchOverview(System.Collections.Generic.List<Argus.Branch>)'
हाँ, ठीक है। तो आपका सवाल क्या विशेष रूप से है? क्या आप समझ नहीं पाएंगे कि त्रुटि संदेश का क्या अर्थ है? या आप इसे समझते हैं लेकिन आप नहीं जानते कि इसे कैसे ठीक किया जाए? या आप समझते हैं कि इसे कैसे ठीक किया जाए, लेकिन आप दो अलग-अलग दृष्टिकोणों के बीच निर्णय ले रहे हैं? –
संभावित असंगतता का संभावित डुप्लिकेट: पैरामीटर प्रकार विधि से कम सुलभ है] (http://stackoverflow.com/questions/6229504/inconsistent-accessibility-parameter-type-is-less-accessible-than-method) – user