CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 43

Threaded View

  1. #1
    Join Date
    Jul 2010
    Location
    .NET 4.0/VS2010
    Posts
    79

    [RESOLVED] Beginning C#

    hey everyone.
    i am new to C# and i'm wondering if you can call a function or a method i guess is what its called but can i call one on load that has a "trigger" that runs a for loop to clear an array? heres what i have for my form load:
    Code:
            public void calculate()
            {
                if (gbl_trigger[0] == 0)
                {
                    for (int i = 0; i < 10; i++)
                    {
                        operand[i] = 0;
                        button15.Text = i.ToString();
                        gbl_trigger[0] = 1;
                    }
                }
            }
        
    
            private void Calculator_Load(object sender, EventArgs e)
            {
                gbl_trigger[0] = 0;
                calculate();
            }
    i am using the .NET framework 4.0 and Visual Studio 2010
    Last edited by rockking; October 8th, 2010 at 11:33 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured