C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Overloading Main method in C#


Posted Date: 17 May 2007    Resource Type: Code Snippets    Category: C# Syntax
Author: Balamurali BalajiMember Level: Diamond    
Rating: Points: 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  
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   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use