label problem in c#
-
hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??
It looks like you created a label, assigned it the "&" symbol, but when you show the message box, you don't put the label in any one of the message box parameters.
-
hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??
This is the wrong forum. Your question does not relate to Web Development. You will get better results by using the correct forum. The messagebox is empty because you have not specified a message. Use one of the overloads found in the documentation[^]
Failure is not an option; it's the default selection.
-
hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??
Label a=new Label();
a.Text="&";
MessageBox.Show(a.Text);//you missed a.Text -
hey guys,.. i am doing my mini project in c# windows form application .. in that i used a label like Label a=new Label(); a.Text="&"; MessageBox.Show();//its showing blank message box Can anyone knows solution for it??