1
If it's a Windows Forms application, you'll need this 'using' directive at the top of the class file:
using System.Windows.Forms;
If it's a console application, you'll need to add a reference to System.Windows.Forms.dll as well as adding the above 'using' directive.
Accepted 5
hi,
agree with Vuples
public int dummy
{
get
{
return 0;
}
set
{
System.Windows.Forms.MessageBox.Show("set Property");
}
}
hope this will help you.
0
But what is syntax for this.Because MessageBox.show give error during writing it in set block.
0
http://www.c-sharpcorner.com/UploadFile/rajeshvs/PropertiesInCS11122005001040AM/PropertiesInCS.aspx
0
hi,
1) yes, you can put message box in set block.
2) you are getting error on code stu.name="some one not arun"; right?
this is due to name is private member of class. .NET does not allow you to access private member out side of scope. so you got the error.
hope this will help you.