C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » C# Syntax »

Overloading Main method in C#


Posted Date: 17 May 2007    Resource Type: Code Snippets    Category: C# Syntax
Author: Balamurali BalajiMember Level: Diamond    
Rating: 1 out of 5Points: 7



The following code sample shows how to overload an application's Entry Point Main method.

The actual Main method has an array of string as it's parameter to take command line arguments. The overloaded method takes an integer as it's argument.



class Program
{
static void Main(string[] args)
{
Console.WriteLine("Main Method");
Main(100);
}
static void Main(int x)
{
Console.WriteLine("Overloaded Main Method: x value is {0}",x);
}
}






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Overloading Main method in C#  .  Main method in C#  .  Function Overloading Main Method  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Adding Exception Messages to Event Viewer
Previous Resource: Email validation using regular expressions
Return to Discussion Resource Index
Post New Resource
Category: C# Syntax


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use