dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Question about making your own methods

  1. #1
    Join Date
    Sep 2019
    Posts
    7

    Question about making your own methods

    I've been working in C++ for awhile so I'm used to having to make a function prototype first and placing that above the int main() function. Then after the main() function I do the function definition. But I would like to make a few of my own methods using C# and am I correct in saying that prototypes are not used in C#?

    Also I don't as of right now want to make a separate code file and create a new class and put my methods in there. I simply would like to place my method definitions in the static void Main() method. I've seen two ways of doing this (correct me if I'm wrong).

    It appears you can either define your method above the static void Main() method or right below it.

    How do you guys do it?

    Want to make a recommendation as to which way?

  2. #2
    Join Date
    Sep 2019
    Posts
    7
    I think I will put my user defined methods below (in keeping with the C++ style).

Similar Threads

  1. Question - making rummy card game applet
    By mphamma9 in forum Java
    Replies: 0
    Last Post: 06-05-2006, 11:16 AM
  2. methods
    By harish456 in forum Java
    Replies: 1
    Last Post: 04-25-2006, 07:51 AM
  3. Need some OS methods
    By Samprayoga in forum C++
    Replies: 1
    Last Post: 05-22-2002, 10:09 AM
  4. Static methods question
    By David Rancour in forum Java
    Replies: 1
    Last Post: 05-11-2001, 09:32 AM
  5. Re-making DLL Question (VB6)
    By anonymous in forum VB Classic
    Replies: 2
    Last Post: 02-01-2001, 01:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center