1. What is the difference between the class that is added by using
a.)Project Name=>Add=>New Item=>class
b.)Solution =>Add=>New Item=>visual c# class
which class of the above we should use while dealing with console applications??
2. I tried to execute the below code using Command Line Arguments but it throws an error as below:
Error: Doesnot containg static Main Method suitable for entry point
using System;
class Myclass
{
static void Main(string[] args)
{
foreach(string str in args)
Console.WriteLine(str);
}
}
ali tuncerPosted Feb 17, 2016, 11:37 PM
You need to add from Project...(option A)
When you add from solution(option B), it is not included in the build , you can try it yourself, make some syntax errors, solution will still build succesfully..
Nishant MittalPosted Feb 17, 2016, 2:27 AM
Y GPosted Feb 17, 2016, 1:58 AM
Nishant MittalPosted Feb 17, 2016, 1:38 AM