0
What meam arges and e that I see at function?
5 Réponses
0
e is a standard variable name for exception. It is not mandotory but commomly used.
try
{
// some code
}
catch (Exception ex) // or (Exception e)
//(Exception a) is allowed but confusing
{
Console.WriteLine(ex.message); //if ex is the variable name
// Console.WriteLine(e.message); //if e is the variable name
// Console.WriteLine(a.message);////if a is the variable name
}
0
args are mostly used together with the main method.
it is a shorthand for argument
if you give the following command in the command prompt
notepad.exe c:\temp\file.txt
notepad is the program, or your program
and c:\temp\file.txt is called the argument
static void Main(string[] args)
So in this case
args[0] contains "c:\temp\file.txt"
0
tyvm
0
What do you mean with tyvm ?
0
thank you very much