المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : static data members and methods



C# Programming
08-16-2009, 12:17 PM
{
private static int count;
public StaticDataMembersAndMethods()
{
InitializeComponent();
count++;

}
public void showcount()
{
MessageBox.Show("Value of count is :" + count);
}


private void button1_Click(object sender, EventArgs e)
{
StaticDataMembersAndMethods objstatic = new StaticDataMembersAndMethods();
objstatic.showcount();


}


how to get additions starting from zero? now it starts with number two.