- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Valid variant of Main() in C#
The Main method is the entry point for all C# programs. It states what the class does when executed.
The valid variant of Main() is −
static void Main(string[] args
Here,
static − the object is not needed to access static members
void − return type of the method
Main − entry point for any C# program. Program execution begins here.
string[] args − for command line arguments in C#.
Example
Here is an example −
using System; namespace Program { public class Demo { public static void Main(string[] args) { Console.WriteLine("Welcome!"); Console.ReadKey(); } } }
- Related Articles
- Font Variant in CSS
- Usage of font-variant property in CSS
- Number of Valid Subarrays in C++
- Valid Parentheses in C++
- Valid Sudoku in C++
- CSS font-variant Property
- Difference between void main and int main in C/C++
- Valid Parenthesis String in C++
- Valid Triangle Number in C++
- Valid Palindrome III in C++
- Graph Valid Tree in C++
- Difference between “int main()” and “int main(void)” in C/C++?
- Number of Valid Words for Each Puzzle in C++
- Set the font variant with CSS
- Differentiate between int main and int main(void) function in C

Advertisements