Results 1 to 3 of 3

Thread: [RESOLVED] [2.0] Function shortcut.

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved [RESOLVED] [2.0] Function shortcut.

    Just wondering if C# supported function shortcuts like defining a new variable for messagebox so like I could define msgbox to be the same as messagebox.show. Does C# support this?

    I know i can do

    C# Code:
    1. private void msgbox(string str)
    2.         {
    3.             MessageBox.Show(str);
    4.         }

    But that doesnt allow all the args to be accessed differently. Like if I want 1 time to just have the str i have to provide the other args if another message box needs it. Is there another way?
    Last edited by high6; Apr 3rd, 2007 at 02:00 PM.

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