ILSpy
ILSpy copied to clipboard
cannot declare this variable " sender" in this scope
public virtual void popupMenu_MenuItemClick(object sender, PopupMenu.MenuItemClickEventArgs e) { user_Dialog.SetListView_CheckBox(array2, delegate(object sender, AdapterView.ItemClickEventArgs e) { if (selectOrderByDBName[e.Position] != "") { value = selectOrderByDBName[e.Position]; } } }
The above code cannot declare this variable " sender" in this scope
I want to decompile that way public virtual void popupMenu_MenuItemClick(object sender, PopupMenu.MenuItemClickEventArgs e) { user_Dialog.SetListView_CheckBox(array2, delegate(object sender1, AdapterView.ItemClickEventArgs e1) { if (selectOrderByDBName[e1.Position] != "") { value = selectOrderByDBName[e1.Position]; } } }
Duplicate of #1572
I cannot reproduce the problem you are describing. The lambda in Select_Activity_Other.popupMenu_MenuItemClick
uses sss
as name for the first parameter. Can you tell me the metadata token of the method you are trying to decompile. Thanks!
public void ComBox_OnClick(object sender, EventArgs e)
{
try
{
EditText Combox_EditText = (EditText)sender;
InputMethodManager obj = (InputMethodManager)context_0.GetSystemService("input_method");
obj.HideSoftInputFromWindow(Combox_EditText.WindowToken, HideSoftInputFlags.None);
obj.Dispose();
if (Global_Variables.CommonVariable.System_IsDialogState)
{
Global_Variables.CommonVariable.System_IsDialogState = false;
return;
}
Global_Variables.CommonVariable.System_IsDialogState = true;
string[] Strs = new string[3] { "中", "左", "右" };
User_Dialog user_Dialog = new User_Dialog(context_0, Resource.Style.MyDialog);
user_Dialog.SetTitle("请选择<对齐方式>");
user_Dialog.SetTitleSize(25);
//The following line of code will indicate an error cannot declare this variable " sender" in this scope user_Dialog.SetListView_CheckBox(Strs, delegate(object sender, AdapterView.ItemClickEventArgs e) { try { Combox_EditText.Text = Strs[e.Position].ToString(); } catch { } }); user_Dialog.Show(); } catch { } }
I still cannot reproduce this. Please, if you give an example, please post the full name (i.e., the name of the method and containing type and containing namespace + assembly) of the method or the metadata token number. It is impossible for me to find the code you posted above in the assembly you posted. Also it seems there a lot of references missing. Would it be possible for you to send all the referenced assemblies you have? Thanks!
namespace XH_Android-> public class DataGridView_MultiLine : HorizontalScrollView->public void ComBox_OnClick(object sender, EventArgs e)
You did not send that assembly. There is no namespace XH_Android
Thank you! Will take a look soon.