Answer the question
In order to leave comments, you need to log in
With sharpe.static string Fioo is executed first. Why isn't static void main executed first?
static void Main(string[] args)
{
int dannie;
string fio = fioo();
Console.Write("...");
dannie = Int32.Parse(Console.ReadLine());
if (dannie == 0)
Console.WriteLine("Enter student's last name:" + fio);
Console.ReadKey();
}
static string Fioo(byte maxSize = 10)
{
string fio;
int count = 0, dx = 0;
do
{
if (count != 0) Console.WriteLine(" Exceeded data size by {0} characters! ", dx);
Console.Write("Enter student's last name:");
fio = Console.ReadLine();
dx = fio.Length - maxSize;
++count;
} while (dx > 0);
Console.Clear();
return fio;
Answer the question
In order to leave comments, you need to log in
Yes, because you yourself call Fioo at the very beginning of Main() ( string fio = Fioo(); )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question