Results 1 to 2 of 2

Thread: Prodecures? and Call statements?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2003
    Location
    CANADA
    Posts
    63

    Question Prodecures? and Call statements?

    I'm very curious... in VB .NET, we can write function and precedure by ourselves and use Call statement to call the precedures we write. Howbout in C#? Can we do the same thing?
    Any help would be very appreciated and if this has been asked, I ask for the forgiveness for not searching carefullin' first!
    Last edited by session; May 7th, 2003 at 11:34 PM.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    You can create your own methods in C#.

    PHP Code:
    private void MyMethod1()
    {
       
    // code here
    }


    private 
    int MyMethod2()
    {
       
    // code here
       
    return myInteger;
    }

    // To call the above methods:

    MyMethod1();

    // And for the second, it returns an integer, 
    // so you must assign a value for the return.
    int returnValue MyMethod2(); 

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